mirror of
https://github.com/getgrav/grav.git
synced 2025-11-02 03:16:04 +01:00
@@ -456,6 +456,10 @@ class SafeUpgradeService
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!$entry->isDir() || $entry->isLink()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
$target = $packagePath . DIRECTORY_SEPARATOR . $name;
|
$target = $packagePath . DIRECTORY_SEPARATOR . $name;
|
||||||
if (file_exists($target)) {
|
if (file_exists($target)) {
|
||||||
continue;
|
continue;
|
||||||
@@ -464,13 +468,7 @@ class SafeUpgradeService
|
|||||||
$source = $entry->getPathname();
|
$source = $entry->getPathname();
|
||||||
Folder::create(dirname($target));
|
Folder::create(dirname($target));
|
||||||
|
|
||||||
if ($entry->isDir() && !$entry->isLink()) {
|
Folder::rcopy($source, $target, true);
|
||||||
Folder::rcopy($source, $target, true);
|
|
||||||
} elseif ($entry->isFile()) {
|
|
||||||
copy($source, $target);
|
|
||||||
} elseif ($entry->isLink()) {
|
|
||||||
@symlink(readlink($source), $target);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user