sync seems to ignore --exclude-dir-regex
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 35/100
Línea de trabajo
The traceback ends in _walk_relative_paths in b2sdk's scan/folder.py (around lines 239-258), which calls pathlib iterdir on a subdirectory that the --exclude-dir-regex should have skipped. Read that walk and check whether the exclude-dir check runs before the recursion descends. Reproduce with a tree that contains an unreadable directory matching the regex. Done when the excluded directory is skipped without being opened, and the sync command finishes without a PermissionError.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Greetings,
While using the sync command on b2-windows version 4.1.0 on Windows 11 (x86_64), the program gives an error message when it hits a directory it cannot access, even when that directory is in --exclude-dir-regex.
Command-line (run in terminal as an administrator):
b2-windows.exe sync --skip-newer --threads 1 --destination-server-side-encryption=SSE-C --no-progress --exclude-all-symlinks --exclude-dir-regex=".*\\Users\\Temp|.*\\Default User|.*\\Users\\Default" --keep-days 60 "C:\Users" b2:bucketname/syncs/lap-24/C/Users
I receive this error
Traceback (most recent call last):
File "b2\_internal\b2v4\__main__.py", line 13, in <module>
File "b2\_internal\console_tool.py", line 5529, in main
File "b2\_internal\console_tool.py", line 5402, in run_command
File "b2\_internal\console_tool.py", line 1070, in run
File "b2\_internal\console_tool.py", line 3165, in _run
File "b2sdk\_internal\sync\sync.py", line 214, in sync_folders
File "b2sdk\_internal\sync\sync.py", line 263, in _make_folder_sync_actions
File "b2sdk\_internal\scan\scan.py", line 48, in zip_folders
File "b2sdk\_internal\scan\folder.py", line 152, in all_files
File "b2sdk\_internal\scan\folder.py", line 258, in _walk_relative_paths
File "b2sdk\_internal\scan\folder.py", line 258, in _walk_relative_paths
File "b2sdk\_internal\scan\folder.py", line 258, in _walk_relative_paths
[Previous line repeated 1 more time]
File "b2sdk\_internal\scan\folder.py", line 239, in _walk_relative_paths
File "pathlib.py", line 1056, in iterdir
PermissionError: [WinError 5] Access is denied: '\\\\?\\C:\\Users\\Default\\AppData\\Local\\Application Data'
[6520] Failed to execute script '__main__' due to unhandled exception!
When testing the regex in a web-tester, it appears to be correct
The program shouldn't be attempting to access a subdirectory of an excluded directory. According to the command-line tool documentation:
When a directory is excluded by using
--exclude-dir-regex, all of the files within it are excluded, even if they match an--include-regexpattern. This means that there is no need to look inside excluded directories, and you can exclude directories containing files for which you don’t have read permission and avoid getting errors.
Thanks 👍
- Lenguaje dominante
- Python
- Estrellas
- 638
- Forks
- 138
- Merge medio
- 8 h 27 min
- PR fusionados (30 d)
- 8
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de Backblaze/B2_Command_Line_Tool
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
Backblaze/B2_Command_Line_Tool#553 · 2 comentarios · 3 reacciones ·
Los mantenedores suelen responder en 1 día
-
Adopt the AI-native SDLC playbook and repository policiesPosiblemente ocupada @goanpeca la tomó hace 18 días. Abiertoenhancement
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
Backblaze/B2_Command_Line_Tool#1192 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
Backblaze/B2_Command_Line_Tool#1168 ·
Los mantenedores suelen responder en 1 día
-
Add to MacPortsAbierto
Dificultad 3/5 1-2 días Aptitud para principiantes 50/100
Backblaze/B2_Command_Line_Tool#1161 ·
Los mantenedores suelen responder en 1 día
-
b2 ls timestamps human readableAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 56/100
Backblaze/B2_Command_Line_Tool#1155 ·
Los mantenedores suelen responder en 1 día
Todos los issues de Backblaze/B2_Command_Line_Tool
Issues similares
-
ライブラリを追加Abiertopriority middle
Dificultad 1/5 Menos de una hora Aptitud para principiantes 62/100
KATO-Hiro/AtCoderClans#13015 ·
Los mantenedores suelen responder en 1 día
-
StringLiteral to IntegerType/LongType silently truncates fractional strings, changing predicate meaningPosiblemente ocupada @Shahzeb-DataEngineer la tomó hoy. Abiertokind:bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
apache/iceberg-python#4382 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
request-theme
Dificultad 2/5 Menos de una hora Aptitud para principiantes 62/100
LizardByte/ThemerrDB#10024 · 2 comentarios ·
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 72/100
btclib-org/btclib-node#2505 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
open-webui/open-webui#34462 · 1 comentario ·
Los mantenedores suelen responder en 1 día