v2.1.8
This commit is contained in:
parent
658eb9b4da
commit
476389b914
93 changed files with 1864 additions and 305 deletions
6
vendor/symfony/filesystem/Filesystem.php
vendored
6
vendor/symfony/filesystem/Filesystem.php
vendored
|
|
@ -543,11 +543,7 @@ class Filesystem
|
|||
|
||||
// Iterate in destination folder to remove obsolete entries
|
||||
if ($this->exists($targetDir) && isset($options['delete']) && $options['delete']) {
|
||||
$deleteIterator = $iterator;
|
||||
if (null === $deleteIterator) {
|
||||
$flags = \FilesystemIterator::SKIP_DOTS;
|
||||
$deleteIterator = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($targetDir, $flags), \RecursiveIteratorIterator::CHILD_FIRST);
|
||||
}
|
||||
$deleteIterator = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($targetDir, \FilesystemIterator::SKIP_DOTS), \RecursiveIteratorIterator::CHILD_FIRST);
|
||||
$targetDirLen = \strlen($targetDir);
|
||||
foreach ($deleteIterator as $file) {
|
||||
$origin = $originDir.substr($file->getPathname(), $targetDirLen);
|
||||
|
|
|
|||
2
vendor/symfony/filesystem/Path.php
vendored
2
vendor/symfony/filesystem/Path.php
vendored
|
|
@ -746,7 +746,7 @@ final class Path
|
|||
|
||||
// Collapse ".." with the previous part, if one exists
|
||||
// Don't collapse ".." if the previous part is also ".."
|
||||
if ('..' === $part && \count($canonicalParts) > 0 && '..' !== $canonicalParts[\count($canonicalParts) - 1]) {
|
||||
if ('..' === $part && $canonicalParts && '..' !== $canonicalParts[\count($canonicalParts) - 1]) {
|
||||
array_pop($canonicalParts);
|
||||
|
||||
continue;
|
||||
|
|
|
|||
Loading…
Reference in a new issue