unwrap cast to unify curlDown with curlExec

This commit is contained in:
DubbleClick 2025-04-22 14:36:58 +07:00
parent a29992b907
commit 74d8377400

View File

@ -573,14 +573,7 @@ class Downloader
$check = !defined('DEBUG_MODE') ? 's' : '#';
$retry = $retries > 0 ? "--retry {$retries}" : '';
$cmd = SPC_CURL_EXEC . " -{$check}fSL {$retry} -o \"{$path}\" {$methodArg} {$headerArg} \"{$url}\"";
try {
f_passthru($cmd);
} catch (RuntimeException $e) {
if ($e->getCode() === 2 || $e->getCode() === -1073741510) {
throw new WrongUsageException('Keyboard interrupted, download failed !');
}
throw $e;
}
f_passthru($cmd);
}
public static function getPreBuiltLockName(string $source): string