We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 089eb76 commit 45ae1fdCopy full SHA for 45ae1fd
module/DeployAgent/src/Resource/Archive/Extractor/TarGzExtractor.php
@@ -29,16 +29,16 @@ class TarGzExtractor implements ExtractorInterface
29
*/
30
public function extract(\SplFileInfo $archive, \SplFileInfo $destination)
31
{
32
- //if (preg_match('/^win/i', PHP_OS)) {
+ if (preg_match('/^win/i', PHP_OS)) {
33
$targz = new \PharData($archive->getPathname());
34
/** @var \PharData $tar */
35
$tar = $targz->decompress();
36
$tar->extractTo($destination->getPathname());
37
unlink(str_replace('.tar.gz', '.tar', $archive->getPathname()));
38
- /*} else {
+ } else {
39
exec('tar xzf ' . $archive->getPathname() . ' -C ' . $destination->getPathname());
40
unlink($archive->getPathname());
41
- }*/
+ }
42
43
return true;
44
}
0 commit comments