aboutsummaryrefslogtreecommitdiffstats
path: root/telegram-chat.rsc
diff options
context:
space:
mode:
Diffstat (limited to 'telegram-chat.rsc')
-rw-r--r--telegram-chat.rsc4
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");