mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-29 01:08:56 +00:00
Separate zip and szip cases
This commit is contained in:
@@ -931,16 +931,28 @@ class ProcessAdditional
|
||||
}
|
||||
break;
|
||||
case ArchiveInfo::TYPE_SZIP:
|
||||
case ArchiveInfo::TYPE_ZIP:
|
||||
if ($this->_echoCLI) {
|
||||
$this->_echo('7z', 'primaryOver');
|
||||
}
|
||||
|
||||
if (! $this->_extractUsingRarInfo && ! empty($this->_7zipPath)) {
|
||||
$fileName = $this->tmpPath.uniqid('', true).'.7z';
|
||||
File::put($fileName, $compressedData);
|
||||
// Pass the -p flag to the 7zip command to make sure it doesn't get stuck in password prompt
|
||||
runCmd($this->_killString.$this->_7zipPath.'" x -tzip "'.$fileName.'" -p -bd -y -o"'.$this->tmpPath.'unzip/"');
|
||||
File::delete($fileName);
|
||||
}
|
||||
break;
|
||||
case ArchiveInfo::TYPE_ZIP:
|
||||
if ($this->_echoCLI) {
|
||||
$this->_echo('z', 'primaryOver');
|
||||
}
|
||||
|
||||
if (! $this->_extractUsingRarInfo && ! empty($this->_7zipPath)) {
|
||||
$fileName = $this->tmpPath.uniqid('', true).'.zip';
|
||||
File::put($fileName, $compressedData);
|
||||
// Pass the -p flag to the 7zip command to make sure it doesn't get stuck in password prompt
|
||||
runCmd($this->_killString.$this->_7zipPath.'" x -tzip "'.$fileName.'" -p -bd -y -o"'.$this->tmpPath.'unzip/"');
|
||||
runCmd($this->_killString.$this->_7zipPath.'" x "'.$fileName.'" -p -bd -y -o"'.$this->tmpPath.'unzip/"');
|
||||
File::delete($fileName);
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user