Add custom paths and ACP tab
Some checks failed
CI/CD Pipeline / test (push) Successful in 12s
CI/CD Pipeline / deploy (push) Failing after 11s
CI/CD Pipeline / promote_stable (push) Has been skipped

This commit is contained in:
2026-02-13 10:04:28 +01:00
parent bac70c3927
commit 0ad5916504
4 changed files with 34 additions and 8 deletions

View File

@@ -113,6 +113,7 @@ class SystemUpdateController extends Controller
$append('Syncing files...');
$usedRsync = false;
$rsyncPath = trim((string) shell_exec('command -v rsync'));
$protectedPaths = ['custom', 'public/custom'];
if ($rsyncPath !== '') {
$usedRsync = true;
$rsync = new Process([
@@ -122,6 +123,8 @@ class SystemUpdateController extends Controller
'--exclude=.env',
'--exclude=storage',
'--exclude=public/storage',
'--exclude=custom',
'--exclude=public/custom',
$sourceDir . '/',
base_path() . '/',
]);
@@ -134,6 +137,15 @@ class SystemUpdateController extends Controller
], 500);
}
} else {
foreach ($protectedPaths as $path) {
$sourcePath = $sourceDir . DIRECTORY_SEPARATOR . $path;
if (File::exists($sourcePath)) {
File::deleteDirectory($sourcePath);
if (File::exists($sourcePath)) {
File::delete($sourcePath);
}
}
}
File::copyDirectory($sourceDir, base_path());
}