mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-06-20 17:05:44 +02:00
telegram-chat: use $FileExists ...
... to work around restrictions in new file handling.
This commit is contained in:
parent
80aed200fd
commit
30b80e903d
1 changed files with 2 additions and 1 deletions
|
@ -30,6 +30,7 @@
|
|||
:global CertificateAvailable;
|
||||
:global EitherOr;
|
||||
:global EscapeForRegEx;
|
||||
:global FileExists;
|
||||
:global GetRandom20CharAlNum;
|
||||
:global IfThenElse;
|
||||
:global LogPrint;
|
||||
|
@ -154,7 +155,7 @@
|
|||
:if ([ $WaitForFile ($File . ".done") [ $EitherOr $TelegramChatRunTime 20s ] ] = false) do={
|
||||
:set State ([ $SymbolForNotification "warning-sign" ] . "The command did not finish, still running in background.\n\n");
|
||||
}
|
||||
:if ([ :len [ /file/find where name=($File . ".failed") ] ] > 0) do={
|
||||
:if ([ $FileExists ($File . ".failed") ] = true) do={
|
||||
:set State ([ $SymbolForNotification "cross-mark" ] . "The command failed with an error!\n\n");
|
||||
}
|
||||
:local Content ([ /file/read chunk-size=32768 file=$File as-value ]->"data");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue