Skip to content

Commit 824b4d7

Browse files
committed
Use correct target_base for unpacking
In #2, we accidentally changed the `target_base` from the target base to the parent of the file. This would cause hardlink unpacking to fail. Example: A hardlink at `hardlinked-0.1.0/pyproject.toml` pointing to `hardlinked-0.1.0/pyproject.toml.real` would try pointing to `hardlinked-0.1.0/`hardlinked-0.1.0/pyproject.toml.real` instead and fail the unpacking. [future edit: uv companion PR with test]
1 parent 9b5e692 commit 824b4d7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/entry.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ impl<R: Read + Unpin> EntryFields<R> {
516516
memo.insert(parent.to_path_buf());
517517
}
518518

519-
self.unpack(Some(&parent), &file_dst)
519+
self.unpack(Some(&dst), &file_dst)
520520
.await
521521
.map_err(|e| TarError::new(&format!("failed to unpack `{}`", file_dst.display()), e))?;
522522

0 commit comments

Comments
 (0)