mirror of
https://github.com/astral-sh/uv.git
synced 2025-08-04 19:08:04 +00:00
Remove an unnecessary Path
clone (#1153)
This commit is contained in:
parent
d243250dec
commit
888a9e6f53
1 changed files with 3 additions and 4 deletions
|
@ -111,13 +111,12 @@ pub fn unzip_archive<R: Send + std::io::Read + std::io::Seek + HasLength>(
|
|||
let mut file = archive.by_index(file_number)?;
|
||||
|
||||
// Determine the path of the file within the wheel.
|
||||
let file_path = match file.enclosed_name() {
|
||||
Some(path) => path.to_owned(),
|
||||
None => return Ok(()),
|
||||
let Some(enclosed_name) = file.enclosed_name() else {
|
||||
return Ok(());
|
||||
};
|
||||
|
||||
// Create necessary parent directories.
|
||||
let path = target.join(file_path);
|
||||
let path = target.join(enclosed_name);
|
||||
if file.is_dir() {
|
||||
fs_err::create_dir_all(path)?;
|
||||
return Ok(());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue