From 5846b85e287186d85c6e194debacae47af77d06a Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Mon, 13 Dec 2021 23:54:30 +0100 Subject: global-functions: $MkDir: log error --- global-functions | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/global-functions b/global-functions index e0d770a..2163f73 100644 --- a/global-functions +++ b/global-functions @@ -495,6 +495,7 @@ :global CleanFilePath; :global GetRandom20CharHex; + :global LogPrintExit2; :global WaitForFile; :set Dir [ $CleanFilePath $Dir ]; @@ -504,11 +505,12 @@ } :local Return true; - :local Name ($Dir . "-" . [ $GetRandom20CharHex ]) + :local Name ($Dir . "-" . [ $GetRandom20CharHex ]); :do { / ip smb share add disabled=yes directory=$Dir name=$Name; $WaitForFile $Dir; } on-error={ + $LogPrintExit2 warning $0 ("Making directory '" . $Dir . "' failed!") false; :set Return false; } / ip smb share remove [ find where name=$Name ]; -- cgit v1.2.3-54-g00ecf