]> Git [git.vados.ru] :: Repos - Mikrotiks/ros.vados.ru.git/commitdiff
Autocommit in repo: ros.vados.ru, generated by owner: root, in 12:20:03 04.05.2026.
authorvados-dev <192440777+vados-dev@users.noreply.github.com>
Mon, 4 May 2026 09:20:04 +0000 (12:20 +0300)
committervados-dev <192440777+vados-dev@users.noreply.github.com>
Mon, 4 May 2026 09:20:04 +0000 (12:20 +0300)
html/AM-GlobalFunc.rsc

index c00d11eda21af9794e075cca4ab9dceb7de36141..944197961e2e5f877c30bb64885aee81672f789f 100644 (file)
@@ -17,9 +17,9 @@
 :global GlobalFuncReady false;
 
 # Git commit id & info, expected configuration version
-:global CommitId "main/553/53721779";
+:global CommitId "main/554/f4442323";
 :global CommitTAG "unknown";
-:global CommitInfo "Autocommit in repo: ros.vados.ru, generated by owner: root, in 12:05:03 04.05.2026.";
+:global CommitInfo "Autocommit in repo: ros.vados.ru, generated by owner: root, in 12:20:03 04.05.2026.";
 
 # The variables are received right here.
 :global GlobalConfVersion 140;
   }
 
   :local FileName ($DirName . "/" . [ $CleanName $0 ] . "-" . [ $GetRandom20CharAlNum ]);
-  :do {
-    /tool/fetch check-certificate=$CheckCert url=$fetchUrl dst-path=$FileName \
+  :onerror Err {
+    /tool/fetch check-certificate=$CheckCert $fetchUrl dst-path=$FileName \
       http-header-field=({ [ $FetchUserAgentStr $ScriptName ] }) as-value;
-  } on-error={
+  } do={
     :if ([ $WaitForFile $FileName 500ms ] = true) do={
       $RmFile $FileName;
     }
-    $LogPrint debug $0 ("Failed downloading from " . $fetchUrl . " - " . $Err);
+    :log error ($0 . " Failed downloading from " . $fetchUrl . " - " . $Err);
     $RmDir $DirName;
     :return false;
   }
+
   :if ([ $WaitForFile $FileName 5s ] = false) do={
-    $LogPrint debug $0 ("The file downloaded from " . $fetchUrl . " did not show up.");
+    :log error ($0 . "The file downloaded from " . $fetchUrl . " did not show up.");
     :return false;
   }
+  
   :local FileSize [ /file/get $FileName size ];
   :local Return "";
   :local VarSize 0;
       :delay 100ms;
     }
   }
-  $RmFile $FileName;
+#  $RmFile $FileName;
   $RmDir $DirName;
   :return $Return;
 }