summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xsrc/password-store.sh1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/password-store.sh b/src/password-store.sh
index 7cf560c..d44b005 100755
--- a/src/password-store.sh
+++ b/src/password-store.sh
@@ -431,6 +431,7 @@ cmd_edit() {
fi
${EDITOR:-vi} "$tmp_file"
[[ -f $tmp_file ]] || die "New password not saved."
+ $GPG -d -o - "${GPG_OPTS[@]}" "$passfile" | diff - "$tmp_file" &>/dev/null && die "Password unchanged."
while ! $GPG -e "${GPG_RECIPIENT_ARGS[@]}" -o "$passfile" "${GPG_OPTS[@]}" "$tmp_file"; do
yesno "GPG encryption failed. Would you like to try again?"
done