Fix proc_open error

This commit is contained in:
walkor 2023-03-31 22:07:21 +08:00 committed by GitHub
parent 37034552e4
commit 4ad326a9af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -351,7 +351,7 @@ class PluginController extends Base
protected function getUnzipCmd($zip_file, $extract_to)
{
if ($cmd = $this->findCmd('unzip')) {
$cmd = "$cmd -qq $zip_file -d $extract_to";
$cmd = "$cmd -o -qq $zip_file -d $extract_to";
} else if ($cmd = $this->findCmd('7z')) {
$cmd = "$cmd x -bb0 -y $zip_file -o$extract_to";
} else if ($cmd = $this->findCmd('7zz')) {
@ -369,8 +369,8 @@ class PluginController extends Base
protected function unzipWithCmd($cmd)
{
$desc = [
0 => STDIN,
1 => STDOUT,
0 => ["pipe", "r"],
1 => ["pipe", "w"],
2 => ["pipe", "w"],
];
$handler = proc_open($cmd, $desc, $pipes);