Merge remote-tracking branch 'discordier/fix-zip-downloader'
commit
5336b039c1
|
@ -39,11 +39,17 @@ class ZipDownloader extends ArchiveDownloader
|
|||
// try to use unzip on *nix
|
||||
if (!defined('PHP_WINDOWS_VERSION_BUILD')) {
|
||||
$command = 'unzip '.escapeshellarg($file).' -d '.escapeshellarg($path) . ' && chmod -R u+w ' . escapeshellarg($path);
|
||||
if (0 === $this->process->execute($command, $ignoredOutput)) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
if (0 === $this->process->execute($command, $ignoredOutput)) {
|
||||
return;
|
||||
}
|
||||
|
||||
$processError = 'Failed to execute ' . $command . "\n\n" . $this->process->getErrorOutput();
|
||||
$processError = 'Failed to execute ' . $command . "\n\n" . $this->process->getErrorOutput();
|
||||
}
|
||||
catch(\Exception $e)
|
||||
{
|
||||
$processError = $e->getMessage();
|
||||
}
|
||||
}
|
||||
|
||||
if (!class_exists('ZipArchive')) {
|
||||
|
|
Loading…
Reference in New Issue