backup: catch all OSError exceptions while accessing files

We might see these if files change during the scan, for example.
This commit is contained in:
Jim Paris 2021-10-15 23:31:34 -04:00
parent 4028d8fecc
commit 6b5daa74ad

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]):