update for version 1.0.2
This commit is contained in:
11
code/vendor/symfony/filesystem/Filesystem.php
vendored
11
code/vendor/symfony/filesystem/Filesystem.php
vendored
@@ -345,8 +345,13 @@ class Filesystem
|
||||
// Determine how deep the start path is relative to the common path (ie, "web/bundles" = 2 levels)
|
||||
$depth = count($startPathArr) - $index;
|
||||
|
||||
// Repeated "../" for each level need to reach the common path
|
||||
$traverser = str_repeat('../', $depth);
|
||||
// When we need to traverse from the start, and we are starting from a root path, don't add '../'
|
||||
if ('/' === $startPath[0] && 0 === $index && 1 === $depth) {
|
||||
$traverser = '';
|
||||
} else {
|
||||
// Repeated "../" for each level need to reach the common path
|
||||
$traverser = str_repeat('../', $depth);
|
||||
}
|
||||
|
||||
$endPathRemainder = implode('/', array_slice($endPathArr, $index));
|
||||
|
||||
@@ -417,7 +422,7 @@ class Filesystem
|
||||
}
|
||||
} else {
|
||||
if (is_link($file)) {
|
||||
$this->symlink($file->getRealPath(), $target);
|
||||
$this->symlink($file->getLinkTarget(), $target);
|
||||
} elseif (is_dir($file)) {
|
||||
$this->mkdir($target);
|
||||
} elseif (is_file($file)) {
|
||||
|
Reference in New Issue
Block a user