Browse Source

backup: catch all OSError exceptions while accessing files

We might see these if files change during the scan, for example.
master
Jim Paris 7 months ago
parent
commit
d168c5bf54
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      backup.py

+ 2
- 2
backup.py View File

@@ -219,8 +219,8 @@ class Backup:
for entry in it:
self.scan(path=entry.path, parent_st=st)

except PermissionError as e:
self.log('E', f"can't read {pstr(path)}")
except OSError as e:
self.log('E', f"can't read {pstr(path)}: {str(e)}")
return

def main(argv: list[str]):


Loading…
Cancel
Save