aboutsummaryrefslogtreecommitdiffstats
path: root/global-functions.rsc
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2024-04-03 17:36:47 +0200
committerGravatar Christian Hesse <mail@eworm.de>2024-04-06 00:47:21 +0200
commit402f847db2b7446a67634d3720d824a7e6b87e71 (patch)
tree160561dc0b578fdaf2c789cd7c79dbfd562e1f42 /global-functions.rsc
parent61ee5cbd6cbce28385857f9cca184387234fe326 (diff)
global-functions: $FetchHuge: remove file on failed download
Diffstat (limited to 'global-functions.rsc')
-rw-r--r--global-functions.rsc3
1 files changed, 3 insertions, 0 deletions
diff --git a/global-functions.rsc b/global-functions.rsc
index 3c14f22..ab8860f 100644
--- a/global-functions.rsc
+++ b/global-functions.rsc
@@ -417,6 +417,9 @@
/tool/fetch check-certificate=$CheckCert $Url dst-path=$FileName \
http-header-field=({ [ $FetchUserAgentStr $ScriptName ] }) as-value;
} on-error={
+ :if ([ $WaitForFile $FileName 500ms ] = true) do={
+ /file/remove $FileName;
+ }
$LogPrint debug $0 ("Failed downloading from: " . $Url);
:return false;
}