mirror of
https://github.com/getgrav/grav.git
synced 2026-05-07 22:06:43 +02:00
GPM installer now extracts into the grav instance cache folder rather than system tmp folder
This commit is contained in:
@@ -75,7 +75,7 @@ class Installer
|
||||
|
||||
$zip = new \ZipArchive();
|
||||
$archive = $zip->open($package);
|
||||
$tmp = sys_get_temp_dir() . DS . 'Grav-' . uniqid();
|
||||
$tmp = CACHE_DIR . DS . 'tmp/Grav-' . uniqid();
|
||||
|
||||
if ($archive !== true) {
|
||||
self::$error = self::ZIP_OPEN_ERROR;
|
||||
|
||||
@@ -118,7 +118,7 @@ class InstallCommand extends Command
|
||||
|
||||
private function downloadPackage($package)
|
||||
{
|
||||
$this->tmp = sys_get_temp_dir() . DS . 'Grav-' . uniqid();
|
||||
$this->tmp = CACHE_DIR . DS . 'tmp/Grav-' . uniqid();
|
||||
$filename = $package->slug . basename($package->zipball_url);
|
||||
$output = Response::get($package->zipball_url, [], [$this, 'progress']);
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ class SelfupgradeCommand extends Command
|
||||
|
||||
private function download($package)
|
||||
{
|
||||
$this->tmp = sys_get_temp_dir() . DS . 'Grav-' . uniqid();
|
||||
$this->tmp = CACHE_DIR . DS . 'tmp/Grav-' . uniqid();
|
||||
$output = Response::get($package->download, [], [$this, 'progress']);
|
||||
|
||||
Folder::mkdir($this->tmp);
|
||||
|
||||
Reference in New Issue
Block a user