mirror of
https://github.com/astral-sh/uv.git
synced 2025-11-18 19:21:46 +00:00
Avoid re-creating directories in async unzip (#1155)
This PR extends the optimizations from #1154 to other unzip paths.
This commit is contained in:
parent
3d10f344f3
commit
a25a1f2958
3 changed files with 19 additions and 9 deletions
|
|
@ -189,10 +189,9 @@ fn unpack_wheel_files<R: Read + Seek>(
|
|||
continue;
|
||||
}
|
||||
|
||||
if let Some(p) = out_path.parent() {
|
||||
if !created_dirs.contains(p) {
|
||||
fs::create_dir_all(p)?;
|
||||
created_dirs.insert(p.to_path_buf());
|
||||
if let Some(parent) = out_path.parent() {
|
||||
if created_dirs.insert(parent.to_path_buf()) {
|
||||
fs::create_dir_all(parent)?;
|
||||
}
|
||||
}
|
||||
let mut outfile = BufWriter::new(File::create(&out_path)?);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue