mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-08-14 06:58:50 +02:00
global-functions: $FetchHuge: remove file on failed download
This commit is contained in:
parent
61ee5cbd6c
commit
402f847db2
1 changed files with 3 additions and 0 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue