Explorar o código

Merge pull request #1367 from PlasmaPower/noatime-fix

Fixed noatime detection
enkore %!s(int64=9) %!d(string=hai) anos
pai
achega
91a9c35bd3
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      src/borg/testsuite/archiver.py

+ 2 - 1
src/borg/testsuite/archiver.py

@@ -393,7 +393,8 @@ class ArchiverTestCase(ArchiverTestCaseBase):
         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: