From bdafd908c7e7d88087986827d1f9b636501b4ba6 Mon Sep 17 00:00:00 2001 From: vados-dev <192440777+vados-dev@users.noreply.github.com> Date: Mon, 4 May 2026 10:05:03 +0300 Subject: [PATCH] Autocommit in repo: ros.vados.ru, generated by owner: root, in 10:05:03 04.05.2026. --- html/AM-GlobalFunc.rsc | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/html/AM-GlobalFunc.rsc b/html/AM-GlobalFunc.rsc index 07fe1446c..6d02254b3 100644 --- a/html/AM-GlobalFunc.rsc +++ b/html/AM-GlobalFunc.rsc @@ -17,9 +17,9 @@ :global GlobalFuncReady false; # Git commit id & info, expected configuration version -:global CommitId "main/536/3e6969a3"; +:global CommitId "main/537/d58e450b"; :global CommitTAG "unknown"; -:global CommitInfo "Autocommit in repo: ros.vados.ru, generated by owner: root, in 09:55:03 04.05.2026."; +:global CommitInfo "Autocommit in repo: ros.vados.ru, generated by owner: root, in 10:05:03 04.05.2026."; # The variables are received right here. :global GlobalConfVersion 138; @@ -733,11 +733,11 @@ :log error ($0 . " Failed creating directory!"); :return false; } - :local FileName ($DirName . "/" . [ $CleanName $0 ] . "-" . [ $GetRandom20CharAlNum ]); - :onerror Err { + :local FileName ($DirName . "/" . [ $CleanName $FHScript ] . "-" . [ $GetRandom20CharAlNum ]); + :do { /tool/fetch check-certificate=$CheckCert $Url dst-path=$FileName \ http-header-field=({ [ $FetchUserAgentStr $FHScript ] }) as-value; - } do={ + } on-error={ :if ([ $WaitForFile $FileName 500ms ] = true) do={ $RmFile $FileName; } @@ -747,6 +747,7 @@ } :if ([ $WaitForFile $FileName 5s ] = false) do={ :log debug ($0 . " The file downloaded from " . $Url . " did not show up."); + $RmDir $DirName; :return false; } :local FileSize [ /file/get $FileName size ]; @@ -760,6 +761,7 @@ :delay 100ms; } } + $RmFile $FileName; $RmDir $DirName; :return $Return; } -- 2.52.0