fsync cache file (#1094)

This commit is contained in:
Jon Meow
2022-02-24 09:51:04 -08:00
committed by GitHub
parent c01634ac8f
commit 900f41cc3a
+2
View File
@@ -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