fix file checks

This commit is contained in:
Dennis Eichhorn 2020-10-08 17:06:25 +02:00
parent 64f498588f
commit 74ed9b9ef7
2 changed files with 2 additions and 2 deletions

View File

@ -90,7 +90,7 @@ class Tar implements ArchiveInterface
*/
public static function unpack(string $source, string $destination) : bool
{
if (!\is_dir($source)) {
if (!\is_file($source)) {
return false;
}

View File

@ -57,7 +57,7 @@ class TarGz implements ArchiveInterface
public static function unpack(string $source, string $destination) : bool
{
$destination = \str_replace('\\', '/', $destination);
if (!\is_dir($destination) || \is_file($source)) {
if (!\is_dir($destination) || !\is_file($source)) {
return false;
}