mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2025-08-18 08:38:28 +02:00
global-functions: $MkDir: fail if non-directory path exists
This commit is contained in:
parent
9c42263988
commit
446d5c89fc
1 changed files with 5 additions and 0 deletions
|
@ -536,6 +536,11 @@
|
||||||
:return true;
|
: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 Return true;
|
||||||
:local Name ($Dir . "-" . [ $GetRandom20CharAlNum 6 ]);
|
:local Name ($Dir . "-" . [ $GetRandom20CharAlNum 6 ]);
|
||||||
:do {
|
:do {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue