File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -243,6 +243,10 @@ fn vpath(p: &Path) -> std::io::Result<VPath> {
243
243
244
244
if let Some ( ( mut virtual_len, parent_depth) ) = virtual_path_u8 {
245
245
for _ in 0 ..parent_depth {
246
+ if base_path_len == 1 {
247
+ break ;
248
+ }
249
+
246
250
base_path_len -= 1 ;
247
251
virtual_len += 1 ;
248
252
@@ -415,6 +419,11 @@ mod tests {
415
419
virtual_segments: Some ( ( "a/b/__virtual__/foo-abcdef/2/c/foo.zip" . into( ) , "c/foo.zip" . into( ) ) ) ,
416
420
zip_path: "bar" . into( ) ,
417
421
} ) ) ) ]
422
+ #[ case( "/__virtual__/foo-abcdef/2/c/foo.zip/bar" , Some ( VPath :: Zip ( ZipInfo {
423
+ base_path: "/" . into( ) ,
424
+ virtual_segments: Some ( ( "__virtual__/foo-abcdef/2/c/foo.zip" . into( ) , "c/foo.zip" . into( ) ) ) ,
425
+ zip_path: "bar" . into( ) ,
426
+ } ) ) ) ]
418
427
#[ case( "./a/b/c/.zip" , None ) ]
419
428
#[ case( "./a/b/c/foo.zipp" , None ) ]
420
429
#[ case( "./a/b/c/foo.zip/bar/baz/qux.zip" , Some ( VPath :: Zip ( ZipInfo {
You can’t perform that action at this time.
0 commit comments