From 010bea56dca6b501978f57ef4a830a7dad497833 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Mon, 4 Mar 2024 20:49:44 +0100 Subject: telegram-chat: error when making directory fails --- telegram-chat.rsc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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"); -- cgit v1.2.3-70-g09d2