Skip to content

Commit 653d6f3

Browse files
committed
Fix unzip
1 parent 577e21c commit 653d6f3

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/app/DownloadHandler/MicroHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public function handle(string $pkgName, string $version, array $options = []): ?
4343
$zip->open($savePath);
4444
for ($i = 0; $i < $zip->numFiles; ++$i) {
4545
$filename = $zip->getNameIndex($i);
46-
if (str_ends_with($filename, 'micro.sfx')) {
46+
if ($filename === 'micro.sfx') {
4747
copy('zip://' . $savePath . '#' . $filename, $renameTo);
4848
}
4949
}

src/app/DownloadHandler/PhpHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public function handle(string $pkgName, string $version, array $options = []): ?
4545
$zip->open($savePath);
4646
for ($i = 0; $i < $zip->numFiles; ++$i) {
4747
$filename = $zip->getNameIndex($i);
48-
if (str_ends_with($filename, 'php')) {
48+
if ($filename === 'php') {
4949
copy('zip://' . $savePath . '#' . $filename, $renameTo);
5050
}
5151
}

0 commit comments

Comments
 (0)