Issue #4947, add check for empty variable

This commit is contained in:
Mikhail f. Shiryaev 2019-04-10 14:29:04 +02:00
parent c5acd61e0d
commit 87abf1f38e

View File

@ -32,6 +32,8 @@ for dir in "$DATA_DIR" \
"$USER_PATH" \
"$FORMAT_SCHEMA_PATH"
do
# check if variable not empty
[ -z "$dir" ] && continue
# ensure directories exist
if ! mkdir -p "$dir"; then
echo "Couldn't create necessary directory: $dir"