mirror of
https://github.com/eworm-de/routeros-scripts
synced 2024-05-14 08:04:19 +00:00
global-functions: $MkDir: fail if non-directory path exists
This commit is contained in:
parent
9c42263988
commit
446d5c89fc
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue