aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2021-12-13 23:54:30 +0100
committerGravatar Christian Hesse <mail@eworm.de>2021-12-14 00:07:22 +0100
commit5846b85e287186d85c6e194debacae47af77d06a (patch)
treef69ad8f519443c783f75315216507c304e2d129f
parente111832462d4ad9746cf90daa2486e3646cb03cc (diff)
global-functions: $MkDir: log error
-rw-r--r--global-functions4
1 files changed, 3 insertions, 1 deletions
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 ];