File tree 1 file changed +4
-4
lines changed
src/Symfony/Component/Filesystem
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)
480
480
$ startPathArr = explode ('/ ' , trim ($ startPath , '/ ' ));
481
481
$ endPathArr = explode ('/ ' , trim ($ endPath , '/ ' ));
482
482
483
- $ normalizePathArray = function ($ pathSegments, $ absolute ) {
483
+ $ normalizePathArray = function ($ pathSegments ) {
484
484
$ result = array ();
485
485
486
486
foreach ($ pathSegments as $ segment ) {
487
- if ('.. ' === $ segment && ( $ absolute || count ( $ result )) ) {
487
+ if ('.. ' === $ segment ) {
488
488
array_pop ($ result );
489
489
} elseif ('. ' !== $ segment ) {
490
490
$ result [] = $ segment ;
@@ -494,8 +494,8 @@ public function makePathRelative($endPath, $startPath)
494
494
return $ result ;
495
495
};
496
496
497
- $ startPathArr = $ normalizePathArray ($ startPathArr, static :: isAbsolutePath ( $ startPath ) );
498
- $ endPathArr = $ normalizePathArray ($ endPathArr, static :: isAbsolutePath ( $ endPath ) );
497
+ $ startPathArr = $ normalizePathArray ($ startPathArr );
498
+ $ endPathArr = $ normalizePathArray ($ endPathArr );
499
499
500
500
// Find for which directory the common path stops
501
501
$ index = 0 ;
You can’t perform that action at this time.
0 commit comments