mirror of
https://github.com/borgbackup/borg.git
synced 2025-02-26 16:04:06 +00:00
use os.replace not os.rename
This commit is contained in:
parent
163e92dd04
commit
e1bb669400
1 changed files with 1 additions and 1 deletions
|
@ -141,7 +141,7 @@ def acquire(self, timeout=None, sleep=None):
|
|||
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 a new issue