"git@developer.sourcefind.cn:dadigang/Ventoy.git" did not exist on "1db0827463c230fc6b11aeb987c84f13eb493f5f"
Unverified Commit 2b566c18 authored by Thomas Wolf's avatar Thomas Wolf Committed by GitHub
Browse files

Merge pull request #2384 from dimagalat/master

Releasing file lock
parents 896a0eb1 2926852f
...@@ -385,9 +385,6 @@ def get_from_cache( ...@@ -385,9 +385,6 @@ def get_from_cache(
else: else:
http_get(url, temp_file, proxies=proxies, resume_size=resume_size, user_agent=user_agent) http_get(url, temp_file, proxies=proxies, resume_size=resume_size, user_agent=user_agent)
# we are copying the file before closing it, so flush to avoid truncation
temp_file.flush()
logger.info("storing %s in cache at %s", url, cache_path) logger.info("storing %s in cache at %s", url, cache_path)
os.rename(temp_file.name, cache_path) os.rename(temp_file.name, cache_path)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment