Skip to content

Commit 459b48e

Browse files
skjnldsvclaude
andcommitted
fix: use parse_url() to detect file:// scheme
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
1 parent 313ea63 commit 459b48e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/Updater.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -768,7 +768,7 @@ private function downloadArchive(string $fromUrl, string $toLocation): bool {
768768
}
769769

770770
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
771-
$isFileUrl = str_starts_with($fromUrl, 'file://');
771+
$isFileUrl = parse_url($fromUrl, PHP_URL_SCHEME) === 'file';
772772
if (!$isFileUrl && $httpCode !== 200 && $httpCode !== 206) {
773773
fclose($fp);
774774
unlink($toLocation);

0 commit comments

Comments
 (0)