소스 검색

fsync cache file (#1094)

Jon Meow 4 년 전
부모
커밋
900f41cc3a
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      scripts/scripts_utils.py

+ 2 - 0
scripts/scripts_utils.py

@@ -81,6 +81,8 @@ def _download(url: str, local_path: Path) -> Optional[int]:
             return int(response.code)
         with local_path.open("wb") as f:
             shutil.copyfileobj(response, f)
+            # Run fsync because of "Text file busy" in GH Actions.
+            os.fsync(f.fileno())
     return None