diff --git a/src/Path.php b/src/Path.php index 1a74881..24b6575 100644 --- a/src/Path.php +++ b/src/Path.php @@ -143,7 +143,9 @@ class Path case "": break; case ".": break; case "..": - if (count($result) > 0) { array_pop($result); break; } + if (count($result) > 0 && $result[count($result) - 1] != '..') { + array_pop($result); break; + } default: array_push($result, $n); }