Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix /foo/../../ case
  • Loading branch information
lizmat committed Dec 22, 2014
1 parent f182b5e commit 885d6ab
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/core/IO.pm
Expand Up @@ -147,6 +147,12 @@ sub MAKE-CLEAN-PARTS(Str $abspath) {
}
}


# back part cleanup
@parts.pop
while $checks
&& %CLEAN-PARTS-NUL.exists_key(@parts.at_pos($checks--).WHICH);

# need (at least) / at the end
my $elems := @parts.elems;
@parts.push("") if $elems == 1 || @parts.at_pos($elems - 1) ne "";
Expand Down

0 comments on commit 885d6ab

Please sign in to comment.