mirror of
https://github.com/astral-sh/uv.git
synced 2025-10-30 03:27:31 +00:00
Improve concurrency safety of Python downloads into cache (#14846)
This commit is contained in:
parent
310a9d3426
commit
f7ac6875c3
1 changed files with 5 additions and 1 deletions
|
|
@ -988,7 +988,11 @@ impl ManagedPythonDownload {
|
||||||
archive_writer.flush().await?;
|
archive_writer.flush().await?;
|
||||||
}
|
}
|
||||||
// Move the completed file into place, invalidating the `File` instance.
|
// Move the completed file into place, invalidating the `File` instance.
|
||||||
fs_err::rename(&temp_file, target_cache_file)?;
|
match rename_with_retry(&temp_file, target_cache_file).await {
|
||||||
|
Ok(()) => {}
|
||||||
|
Err(_) if target_cache_file.is_file() => {}
|
||||||
|
Err(err) => return Err(err.into()),
|
||||||
|
}
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue