1
0
Fork 0

Merge pull request #4105 from gmsantosxl/master

Remove extra '/' when findShortestPath $from is a directory
pull/4051/merge
Jordi Boggiano 2015-06-05 13:18:07 +01:00
commit 7351136205
2 changed files with 2 additions and 1 deletions

View File

@ -316,7 +316,7 @@ class Filesystem
$to = lcfirst($this->normalizePath($to));
if ($directories) {
$from .= '/dummy_file';
$from = rtrim($from, '/') . '/dummy_file';
}
if (dirname($from) === dirname($to)) {

View File

@ -112,6 +112,7 @@ class FilesystemTest extends TestCase
array('/foo/bar_vendor', '/foo/bar', '../bar', true),
array('/foo/bar_vendor', '/foo/bar/src', '../bar/src', true),
array('/foo/bar_vendor/src2', '/foo/bar/src/lib', '../../bar/src/lib', true),
array('C:/', 'C:/foo/bar/', "foo/bar", true),
);
}