mirror of
https://github.com/borgbackup/borg.git
synced 2026-05-28 04:03:21 -04:00
locking (win32): deal with os.listdir PermissionErrors
due to unclear circumstances, windows sometimes just says "PermissionError" when trying to list a directory.
This commit is contained in:
parent
0ce2b55031
commit
7063c2abec
1 changed files with 2 additions and 0 deletions
|
|
@ -191,6 +191,8 @@ class ExclusiveLock:
|
|||
names = os.listdir(self.path)
|
||||
except FileNotFoundError: # another process did our job in the meantime.
|
||||
pass
|
||||
except PermissionError: # win32 might throw this.
|
||||
return False
|
||||
else:
|
||||
for name in names:
|
||||
try:
|
||||
|
|
|
|||
Loading…
Reference in a new issue