We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dcef712 commit 41ff300Copy full SHA for 41ff300
src/types.rs
@@ -603,7 +603,12 @@ impl ZipFileData {
603
let mut depth = 0usize;
604
for component in path.components() {
605
match component {
606
- Component::Prefix(_) | Component::RootDir => return None,
+ Component::Prefix(_) | Component::RootDir => {
607
+ if depth > 0 {
608
+ return None;
609
+ }
610
+ // else absolute path becomes relative to destination instead
611
612
Component::ParentDir => depth = depth.checked_sub(1)?,
613
Component::Normal(_) => depth += 1,
614
Component::CurDir => (),
0 commit comments