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:
commit
91a9c35bd3
1 changed files with 2 additions and 1 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue