Skip to content

Commit 2d75649

Browse files
committed
removed check causing false positives
Signed-off-by: Andy Miller <rhuk@mac.com>
1 parent c8acc9a commit 2d75649

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

system/src/Grav/Common/Upgrade/SafeUpgradeService.php

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -914,18 +914,6 @@ private function hydrateIgnoredDirectories(string $packagePath, array $ignores):
914914
$live = $this->rootPath . '/' . $relative;
915915
$stage = $packagePath . '/' . $relative;
916916

917-
// Only delete from staging area, NEVER from live installation
918-
// Check if stage path is directly under root (e.g., /home/grav/user)
919-
// but allow subdirectories (e.g., /home/grav/tmp/.../package/user)
920-
$realStage = realpath(dirname($stage));
921-
$realRoot = realpath($this->rootPath);
922-
if ($realStage === $realRoot) {
923-
throw new RuntimeException(
924-
'SAFETY VIOLATION: Attempted to delete directory from live installation during hydration. ' .
925-
'Stage path appears to be directly in live root. This should never happen.'
926-
);
927-
}
928-
929917
Folder::delete($stage);
930918

931919
if (!is_dir($live)) {

0 commit comments

Comments
 (0)