From c863dcc89fee525cd8d1b905ce89b64da8d7ccd9 Mon Sep 17 00:00:00 2001 From: Hunter Peavey Date: Sun, 28 Jun 2020 15:29:21 -0700 Subject: [PATCH 1/2] Fix del command "failing" when password is deleted without deleting parent dir --- pash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pash b/pash index cf5d15d..4cd0050 100755 --- a/pash +++ b/pash @@ -60,7 +60,7 @@ pw_del() { # Remove empty parent directories of a password # entry. It's fine if this fails as it means that # another entry also lives in the same directory. - rmdir -p "${1%/*}" 2>/dev/null + rmdir -p "${1%/*}" 2>/dev/null || true } } From 4b32d99f6d0a0798ec5f775d9ba632e09496277b Mon Sep 17 00:00:00 2001 From: Hunter Peavey Date: Mon, 29 Jun 2020 14:56:39 -0700 Subject: [PATCH 2/2] Implement requested changes --- pash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pash b/pash index 4cd0050..6e6b4ad 100755 --- a/pash +++ b/pash @@ -60,7 +60,7 @@ pw_del() { # Remove empty parent directories of a password # entry. It's fine if this fails as it means that # another entry also lives in the same directory. - rmdir -p "${1%/*}" 2>/dev/null || true + rmdir -p "${1%/*}" 2>/dev/null || : } }