From b700f6fff42bf497967a7fc33feb6db95e76ef5c Mon Sep 17 00:00:00 2001
From: Steven Baltakatei Sandoval <baltakatei@gmail.com>
Date: Sat, 8 Jan 2022 02:43:47 +0000
Subject: [PATCH 1/1] fix(u/bktemp-checkAppFileDir:checkdir()):handle blank arg
 case

---
 unitproc/bktemp-checkAppFileDir | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/unitproc/bktemp-checkAppFileDir b/unitproc/bktemp-checkAppFileDir
index d5a620b..6059be6 100644
--- a/unitproc/bktemp-checkAppFileDir
+++ b/unitproc/bktemp-checkAppFileDir
@@ -65,16 +65,18 @@ checkfile() {
 checkdir() {
     # Desc: If arg is a dir path, save result in assoc array 'dirRollCall'
     # Usage: checkdir arg1 arg2 arg3 ...
-    # Version 0.1.1
+    # Version 0.1.2
     # Input: global assoc. array 'dirRollCall'
     # Output: adds/updates key(value) to global assoc array 'dirRollCall';
-    # Output: returns 0 if app found, 1 otherwise
+    # Output: returns 0 if all args are dirs; 1 otherwise
     # Depends: Bash 5.0.3
     local returnState
 
     #===Process Args===
     for arg in "$@"; do
-	if [ -d "$arg" ]; then
+	if [ -z "$arg" ]; then
+	    dirRollCall["(Unspecified Dirname(s))"]="false"; returnState="false";
+	elif [ -d "$arg" ]; then
 	    dirRollCall["$arg"]="true";
 	    if ! [ "$returnState" = "false" ]; then returnState="true"; fi
 	else
-- 
2.39.5