summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/password-store.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/password-store.sh b/src/password-store.sh
index fe21e19..a3fd640 100755
--- a/src/password-store.sh
+++ b/src/password-store.sh
@@ -275,6 +275,10 @@ cmd_init() {
git rm -qr "$gpg_id"
git_commit "Deinitialized ${gpg_id}."
fi
+ gpg_id="${gpg_id%/*}"
+ while rmdir "$gpg_id" &>/dev/null; do
+ gpg_id="${gpg_id%/*}"
+ done
exit 0
fi
@@ -538,6 +542,10 @@ cmd_delete() {
git rm -qr "$passfile"
git_commit "Removed $path from store."
fi
+ passfile="${passfile%/*}"
+ while rmdir "$passfile" &>/dev/null; do
+ passfile="${passfile%/*}"
+ done
}
cmd_copy_move() {
-09-14Use a glob in the pattern match instead of using two comparisons for [yY].Chris Down1-1/+1 2013-09-14Rephrase awkward/confusing message about enabling echo during password entry.Chris Down1-3/+3 2013-09-14Fix directory traversal for reencryption when $PREFIX is a symlinkBrian Shore1-1/+1 2013-08-26Makefile: Do not install bash completion to /etcLukas Fleischer1-3/+2 2013-05-22check if a passfile exists before checking for directoryBrian Mattern1-13/+12