mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2025-10-30 18:06:16 +01:00
more fixes for installation process
This commit is contained in:
@@ -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 = [
|
||||
|
||||
Reference in New Issue
Block a user