capsman-download-packages: handle error when creating directory

This commit is contained in:
Christian Hesse 2021-01-20 14:43:27 +01:00
parent e135ca1238
commit 99aaf642b2

View file

@ -22,7 +22,10 @@ $WaitFullyConnected;
:local Updated false;
:if ([ :len [ / file find where name=$PackagePath type="directory" ] ] = 0) do={
$MkDir $PackagePath;
:if ([ $MkDir $PackagePath ] = false) do={
$LogPrintExit warning ("Creating directory at package path (" . \
$PackagePath . ") failed!") true;
}
$LogPrintExit info ("Created directory at package path (" . $PackagePath . \
"). Please place your packages!") false;
}