mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-02-12 06:48:41 +00:00
fix file checks
This commit is contained in:
parent
64f498588f
commit
74ed9b9ef7
|
|
@ -90,7 +90,7 @@ class Tar implements ArchiveInterface
|
||||||
*/
|
*/
|
||||||
public static function unpack(string $source, string $destination) : bool
|
public static function unpack(string $source, string $destination) : bool
|
||||||
{
|
{
|
||||||
if (!\is_dir($source)) {
|
if (!\is_file($source)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,7 @@ class TarGz implements ArchiveInterface
|
||||||
public static function unpack(string $source, string $destination) : bool
|
public static function unpack(string $source, string $destination) : bool
|
||||||
{
|
{
|
||||||
$destination = \str_replace('\\', '/', $destination);
|
$destination = \str_replace('\\', '/', $destination);
|
||||||
if (!\is_dir($destination) || \is_file($source)) {
|
if (!\is_dir($destination) || !\is_file($source)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user