diff --git a/b2sdk/_internal/scan/folder.py b/b2sdk/_internal/scan/folder.py index d5a6e578..d1a70963 100644 --- a/b2sdk/_internal/scan/folder.py +++ b/b2sdk/_internal/scan/folder.py @@ -114,7 +114,7 @@ def _file_read_access(path): try: with open(path, 'rb', buffering=0): return True - except PermissionError: + except (FileNotFoundError, PermissionError): return False else: diff --git a/changelog.d/+fix_perms_handling_for_win.fixed.md b/changelog.d/+fix_perms_handling_for_win.fixed.md new file mode 100644 index 00000000..8338816c --- /dev/null +++ b/changelog.d/+fix_perms_handling_for_win.fixed.md @@ -0,0 +1 @@ +Fix file/directory permission handling for Windows during the B2 sync.