diff options
author | Christian Hesse <mail@eworm.de> | 2024-03-04 20:49:44 +0100 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2024-03-12 15:27:15 +0100 |
commit | 010bea56dca6b501978f57ef4a830a7dad497833 (patch) | |
tree | 351a1ef0e524832f0f18c14f51a6ab66dd1910c6 /telegram-chat.rsc | |
parent | ed790dea6e7ac48f6f0901b44f7137cc3874403d (diff) |
telegram-chat: error when making directory fails
Diffstat (limited to 'telegram-chat.rsc')
-rw-r--r-- | telegram-chat.rsc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/telegram-chat.rsc b/telegram-chat.rsc index bb12042..528d99c 100644 --- a/telegram-chat.rsc +++ b/telegram-chat.rsc @@ -126,7 +126,9 @@ :if ([ $ValidateSyntax ($Message->"text") ] = true) do={ :local State ""; :local File ("tmpfs/telegram-chat/" . [ $GetRandom20CharAlNum 6 ]); - $MkDir "tmpfs/telegram-chat"; + :if ([ $MkDir "tmpfs/telegram-chat" ] = false) do={ + $LogPrintExit2 error $ScriptName ("Failed creating directory!") true; + } $LogPrintExit2 info $ScriptName ("Running command from update " . $UpdateID . ": " . $Message->"text") false; :execute script=(":do {\n" . $Message->"text" . "\n} on-error={ /file/add name=\"" . $File . ".failed\" };" . \ "/file/add name=\"" . $File . ".done\"") file=($File . "\00"); |