Баг при оптимизации пути
This commit is contained in:
parent
b3047088d4
commit
230c876aa6
1 changed files with 3 additions and 1 deletions
|
|
@ -143,7 +143,9 @@ class Path
|
||||||
case "": break;
|
case "": break;
|
||||||
case ".": break;
|
case ".": break;
|
||||||
case "..":
|
case "..":
|
||||||
if (count($result) > 0) { array_pop($result); break; }
|
if (count($result) > 0 && $result[count($result) - 1] != '..') {
|
||||||
|
array_pop($result); break;
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
array_push($result, $n);
|
array_push($result, $n);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue