1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2024-12-27 18:28:42 +00:00

Merge pull request #1367 from PlasmaPower/noatime-fix

Fixed noatime detection
This commit is contained in:
enkore 2016-07-23 20:15:24 +02:00 committed by GitHub
commit 91a9c35bd3

View file

@ -393,7 +393,8 @@ def test_atime(self):
def has_noatime(some_file):
atime_before = os.stat(some_file).st_atime_ns
try:
os.close(os.open(some_file, flags_noatime))
with open(os.open(some_file, flags_noatime)) as file:
file.read()
except PermissionError:
return False
else: