From 74d8377400630ad88a5736b8b595c6c98b456e8a Mon Sep 17 00:00:00 2001 From: DubbleClick Date: Tue, 22 Apr 2025 14:36:58 +0700 Subject: [PATCH] unwrap cast to unify curlDown with curlExec --- src/SPC/store/Downloader.php | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/SPC/store/Downloader.php b/src/SPC/store/Downloader.php index 69c3d322..085c4ed4 100644 --- a/src/SPC/store/Downloader.php +++ b/src/SPC/store/Downloader.php @@ -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