mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2024-05-11 05:55:19 +00:00
global-functions: $FetchHuge: remove file on failed download
This commit is contained in:
@ -417,6 +417,9 @@
|
|||||||
/tool/fetch check-certificate=$CheckCert $Url dst-path=$FileName \
|
/tool/fetch check-certificate=$CheckCert $Url dst-path=$FileName \
|
||||||
http-header-field=({ [ $FetchUserAgentStr $ScriptName ] }) as-value;
|
http-header-field=({ [ $FetchUserAgentStr $ScriptName ] }) as-value;
|
||||||
} on-error={
|
} on-error={
|
||||||
|
:if ([ $WaitForFile $FileName 500ms ] = true) do={
|
||||||
|
/file/remove $FileName;
|
||||||
|
}
|
||||||
$LogPrint debug $0 ("Failed downloading from: " . $Url);
|
$LogPrint debug $0 ("Failed downloading from: " . $Url);
|
||||||
:return false;
|
:return false;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user