Browse Source

Merge pull request #1134 from enkore/fix/SyncFileX

SyncFile: open with O_EXCL (or equivalent)
TW 9 years ago
parent
commit
808379921c
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/borg/platform/base.py

+ 1 - 1
src/borg/platform/base.py

@@ -75,7 +75,7 @@ class SyncFile:
     """
     """
 
 
     def __init__(self, path):
     def __init__(self, path):
-        self.fd = open(path, 'wb')
+        self.fd = open(path, 'xb')
         self.fileno = self.fd.fileno()
         self.fileno = self.fd.fileno()
 
 
     def __enter__(self):
     def __enter__(self):