mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2024-05-11 05:55:19 +00:00
global-functions: $MkDir: fail if non-directory path exists
This commit is contained in:
@ -536,6 +536,11 @@
|
||||
:return true;
|
||||
}
|
||||
|
||||
:if ([ :len [ /file/find where name=$Dir ] ] = 1) do={
|
||||
$LogPrintExit2 warning $0 ("The path '" . $Dir . "' exists, but is not a directory.") false;
|
||||
:return false;
|
||||
}
|
||||
|
||||
:local Return true;
|
||||
:local Name ($Dir . "-" . [ $GetRandom20CharAlNum 6 ]);
|
||||
:do {
|
||||
|
Reference in New Issue
Block a user