mirror of
https://github.com/borgbackup/borg.git
synced 2025-03-04 18:48:43 +00:00
use os.replace not os.rename
This commit is contained in:
parent
804867d3ad
commit
91104674e7
1 changed files with 1 additions and 1 deletions
|
@ -139,7 +139,7 @@ class ExclusiveLock:
|
||||||
timer = TimeoutTimer(timeout, sleep).start()
|
timer = TimeoutTimer(timeout, sleep).start()
|
||||||
while True:
|
while True:
|
||||||
try:
|
try:
|
||||||
os.rename(temp_path, self.path)
|
os.replace(temp_path, self.path)
|
||||||
except OSError: # already locked
|
except OSError: # already locked
|
||||||
if self.by_me():
|
if self.by_me():
|
||||||
return self
|
return self
|
||||||
|
|
Loading…
Add table
Reference in a new issue