Skip to content

Commit a15c44a

Browse files
authored
Update Zip.php
1 parent e5b1ffe commit a15c44a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Utils/Zip.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,15 +106,15 @@ public function unpack(string $sourcePath, ?string $dirname = null): ?string
106106
return null;
107107
}
108108

109-
public function ensureDoesntHaveSubdir(string $sourcePath)
109+
public function ensureDoesntHaveSubdir(string $sourcePath): string
110110
{
111111
$targetPath = $sourcePath ?? storage_path('app/extensions/.tmp');
112112

113113
$pattern = sprintf("%s/*", rtrim($sourcePath, DIRECTORY_SEPARATOR));
114114
$files = File::glob($pattern);
115115

116116
if (count($files) > 1) {
117-
return false;
117+
return $targetPath;
118118
}
119119

120120
$tmpDir = $targetPath . '-subdir';

0 commit comments

Comments
 (0)