summaryrefslogtreecommitdiff
path: root/src/password-store.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/password-store.sh')
-rwxr-xr-xsrc/password-store.sh12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/password-store.sh b/src/password-store.sh
index 572ce2a..f80f026 100755
--- a/src/password-store.sh
+++ b/src/password-store.sh
@@ -114,12 +114,6 @@ reencrypt_path() {
prev_gpg_recipients="${GPG_RECIPIENTS[@]}"
done
}
-remove_empty_directories() {
- local old_dir="$1"
- while rmdir "$old_dir" &>/dev/null; do
- old_dir="${old_dir%/*}"
- done
-}
#
# END helper functions
@@ -281,7 +275,7 @@ cmd_init() {
git rm -qr "$gpg_id"
git_commit "Deinitialized ${gpg_id}."
fi
- remove_empty_directories "${gpg_id%/*}"
+ rmdir -p "${gpg_id%/*}" 2>/dev/null
exit 0
fi
@@ -545,7 +539,7 @@ cmd_delete() {
git rm -qr "$passfile"
git_commit "Removed $path from store."
fi
- remove_empty_directories "${passfile%/*}"
+ rmdir -p "${passfile%/*}" 2>/dev/null
}
cmd_copy_move() {
@@ -593,7 +587,7 @@ cmd_copy_move() {
git rm -qr "$old_path"
git_add_file "$new_path" "Renamed ${1} to ${2}."
fi
- remove_empty_directories "$old_dir"
+ rmdir -p "$old_dir" 2>/dev/null
else
cp $interactive -r -v "$old_path" "$new_path" || exit 1
[[ -e "$new_path" ]] && reencrypt_path "$new_path"
td>-214/+267 2007-04-20Made qt plugin-ready; lots of documentationnecoro15-81/+351 2007-04-18nomsgnecoro1-1/+0 2007-04-18finished Qt-Frontendnecoro5-15/+117 2007-04-17marking installed packages in pkglistnecoro5-14/+50 2007-04-16added ebuild window for Qt-Frontendnecoro4-2/+229 2007-04-16added preferences for Qt-Frontendnecoro9-279/+710 2007-04-13Improved masking display and made most of the Qt-Frontend worknecoro7-35/+334 2007-04-10Some more functionality for the Qt-Frontend (complete emerge)necoro8-217/+347 2007-04-07Some more functionality for the Qt-Frontendnecoro11-88/+463 2007-04-07Added Qt-Terminalnecoro4-4/+213 2007-04-06First qt draftnecoro6-1/+796 2007-04-04showed masked packages unmasked by the user similar to stable marked testing ...necoro5-13/+40 2007-03-31changed changelognecoro1-1/+2 2007-03-31Some small changes for etcproposals 1.1necoro1-2/+2 2007-03-31Some small changes for etcproposals 1.1necoro2-3/+3 2007-03-31Some small changes for etcproposals 1.1necoro1-6/+13 2007-03-31Allowed Plugins to have a menunecoro7-201/+315 2007-03-15Added etc-proposals pluginnecoro7-28/+121 2007-03-10Added USE_EXPAND-supportnecoro5-11/+63 2007-03-10Added plugin-data to about-dialognecoro3-197/+264 ;id=39af97830aacfc2eee1b51b45423e0245898b5bf&follow=1'>Some small changes for etcproposals 1.1necoro1-2/+2 2007-03-31Some small changes for etcproposals 1.1necoro2-3/+3 2007-03-31Some small changes for etcproposals 1.1necoro1-6/+13 2007-03-31Allowed Plugins to have a menunecoro7-201/+315 2007-03-15Added etc-proposals pluginnecoro7-28/+121 2007-03-10Added USE_EXPAND-supportnecoro5-11/+63 2007-03-10Added plugin-data to about-dialognecoro3-197/+264