mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-02-16 00:18:40 +00:00
Fix temp file name
This commit is contained in:
parent
dc53adec3c
commit
823f161451
|
|
@ -14,6 +14,8 @@ declare(strict_types=1);
|
||||||
|
|
||||||
namespace phpOMS\Utils\IO\Zip;
|
namespace phpOMS\Utils\IO\Zip;
|
||||||
|
|
||||||
|
use phpOMS\System\File\Local\File;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Zip class for handling zip files.
|
* Zip class for handling zip files.
|
||||||
*
|
*
|
||||||
|
|
@ -54,12 +56,12 @@ class TarGz implements ArchiveInterface
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!Gz::unpack($source, $destination . '.tmp')) {
|
if (!Gz::unpack($source, $destination . File::name($source) . '.tmp')) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$unpacked = Tar::unpack($destination . '.tmp', $destination);
|
$unpacked = Tar::unpack($destination . File::name($source) . '.tmp', $destination);
|
||||||
\unlink($destination . '.tmp');
|
\unlink($destination . File::name($source) . '.tmp');
|
||||||
|
|
||||||
return $unpacked;
|
return $unpacked;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user