소스 검색

Fixed noatime detection

Lee Bousfield 9 년 전
부모
커밋
868586dd37
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  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: