diff --git a/SevenZipArchive.php b/SevenZipArchive.php index d708484..c6fe6f6 100644 --- a/SevenZipArchive.php +++ b/SevenZipArchive.php @@ -122,10 +122,12 @@ public function compress() } } - public function decompress() + public function decompress($withFullPath=false) { + $extractFlag = $withFullPath ? 'x' : 'e'; + $command = '"' . $this->_executablePath . '"' - . ' e' + . " {$extractFlag}" . ' -y' . $this->_getPasswordParam() . ' ' . escapeshellarg($this->_archivePath)