File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
src/Symfony/Component/Filesystem Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -480,11 +480,11 @@ public function makePathRelative($endPath, $startPath)
480480 $ startPathArr = explode ('/ ' , trim ($ startPath , '/ ' ));
481481 $ endPathArr = explode ('/ ' , trim ($ endPath , '/ ' ));
482482
483- $ normalizePathArray = function ($ pathSegments, $ absolute ) {
483+ $ normalizePathArray = function ($ pathSegments ) {
484484 $ result = array ();
485485
486486 foreach ($ pathSegments as $ segment ) {
487- if ('.. ' === $ segment && ( $ absolute || count ( $ result )) ) {
487+ if ('.. ' === $ segment ) {
488488 array_pop ($ result );
489489 } elseif ('. ' !== $ segment ) {
490490 $ result [] = $ segment ;
@@ -494,8 +494,8 @@ public function makePathRelative($endPath, $startPath)
494494 return $ result ;
495495 };
496496
497- $ startPathArr = $ normalizePathArray ($ startPathArr, static :: isAbsolutePath ( $ startPath ) );
498- $ endPathArr = $ normalizePathArray ($ endPathArr, static :: isAbsolutePath ( $ endPath ) );
497+ $ startPathArr = $ normalizePathArray ($ startPathArr );
498+ $ endPathArr = $ normalizePathArray ($ endPathArr );
499499
500500 // Find for which directory the common path stops
501501 $ index = 0 ;
You can’t perform that action at this time.
0 commit comments