Skip to content

Commit

Permalink
Merge pull request borgbackup#1134 from enkore/fix/SyncFileX
Browse files Browse the repository at this point in the history
SyncFile: open with O_EXCL (or equivalent)
  • Loading branch information
ThomasWaldmann committed Jun 4, 2016
2 parents 62a2a73 + e41f3ec commit 8083799
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/borg/platform/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class SyncFile:
"""

def __init__(self, path):
self.fd = open(path, 'wb')
self.fd = open(path, 'xb')
self.fileno = self.fd.fileno()

def __enter__(self):
Expand Down

0 comments on commit 8083799

Please sign in to comment.