mirror of https://github.com/borgbackup/borg.git
use os.replace not os.rename
This commit is contained in:
parent
163e92dd04
commit
e1bb669400
|
@ -141,7 +141,7 @@ class ExclusiveLock:
|
|||
timer = TimeoutTimer(timeout, sleep).start()
|
||||
while True:
|
||||
try:
|
||||
os.rename(temp_path, self.path)
|
||||
os.replace(temp_path, self.path)
|
||||
except OSError: # already locked
|
||||
if self.by_me():
|
||||
return self
|
||||
|
|
Loading…
Reference in New Issue