fixed complaint during recustomize when nothing exists in custom yet.
authorChris Koeritz <fred@gruntose.com>
Sat, 5 Dec 2015 17:31:30 +0000 (12:31 -0500)
committerChris Koeritz <fred@gruntose.com>
Sat, 5 Dec 2015 17:31:30 +0000 (12:31 -0500)
scripts/core/functions.sh
scripts/files/safedel.pl

index 724dacb3769c087c0d5bea90b5d405e0afb65b2b..3a6f9ead8764f0aff1e088ab1625f6d6fa7e2773 100644 (file)
@@ -424,7 +424,10 @@ if [ -z "$skip_all" ]; then
     regenerate >/dev/null
     pushd "$FEISTY_MEOW_LOADING_DOCK/custom" &>/dev/null
     local incongruous_files="$(bash "$FEISTY_MEOW_SCRIPTS/files/list_non_dupes.sh" "$FEISTY_MEOW_DIR/customizing/$user" "$FEISTY_MEOW_LOADING_DOCK/custom")"
-    if [ ${#incongruous_files} -ge 1 ]; then
+
+#echo "the incongruous files list is: $incongruous_files"
+    # disallow a single character result, since we get "*" as result when nothing exists yet.
+    if [ ${#incongruous_files} -ge 2 ]; then
       echo "cleaning unknown older overrides..."
       perl "$FEISTY_MEOW_SCRIPTS/files/safedel.pl" $incongruous_files
       echo
index 2315464e1d150781f008b1727f3eb3834c186686..0fd25678045e95c10b5acef0852aec2bf64c578f 100644 (file)
@@ -91,6 +91,9 @@ sub safedel {
     if (substr($file, length($file) - 1, 1) eq ":") {
       die "removing the root directory of a drive is not permitted!";
     }
+
+#print "file to whack: '$file'\n";
+
     if ( ($file =~ /^.*\/\.$/) || ($file =~ /^.*\/\.\.$/) ) {
       print "ignoring attempt to remove current or parent directory.\n";
       next;