more fixes for installation process

This commit is contained in:
Andy Miller
2025-10-17 11:31:02 -06:00
parent 654c2bb9c4
commit fe42c3344d
4 changed files with 72 additions and 5 deletions

View File

@@ -1025,11 +1025,11 @@ class SafeUpgradeManager
$context = [];
if ($this->jobManifestPath) {
$context['manifest'] = $this->jobManifestPath;
$context['manifest'] = $this->convertPathForContext($this->jobManifestPath);
}
if ($this->progressPath) {
$context['progress'] = $this->progressPath;
$context['progress'] = $this->convertPathForContext($this->progressPath);
}
if (!$context) {
@@ -1041,6 +1041,20 @@ class SafeUpgradeManager
return $encoded === false ? null : base64_encode($encoded);
}
private function convertPathForContext(string $path): string
{
$normalized = str_replace('\\', '/', $path);
$root = str_replace('\\', '/', GRAV_ROOT);
if (strpos($normalized, $root) === 0) {
$relative = substr($normalized, strlen($root));
return ltrim($relative, '/');
}
return $normalized;
}
protected function ensureExecutablePermissions(): void
{
$executables = [