summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2014-04-18 01:31:47 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2014-04-18 01:31:47 +0200
commit75929df06ef93bef65f2911359341972726f6be4 (patch)
treedf1a8ddeb933788c3e126393ce6e85b184cc288c
parentebd57647fa54721ec64aba47c79819ad270b3a63 (diff)
downloadpass-75929df06ef93bef65f2911359341972726f6be4.tar.gz
pass-75929df06ef93bef65f2911359341972726f6be4.tar.bz2
pass-75929df06ef93bef65f2911359341972726f6be4.zip
reencryption: remove temporary file on failure
Diffstat (limited to '')
-rwxr-xr-xsrc/password-store.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/password-store.sh b/src/password-store.sh
index 0828a32..598d1bf 100755
--- a/src/password-store.sh
+++ b/src/password-store.sh
@@ -108,7 +108,7 @@ reencrypt_path() {
if [[ $gpg_keys != "$current_keys" ]]; then
echo "$passfile_display: reencrypting to ${gpg_keys//$'\n'/ }"
$GPG -d $GPG_OPTS "$passfile" | $GPG -e "${GPG_RECIPIENT_ARGS[@]}" -o "$passfile.new.$fake_uniqueness_safety" $GPG_OPTS &&
- mv "$passfile.new.$fake_uniqueness_safety" "$passfile"
+ mv "$passfile.new.$fake_uniqueness_safety" "$passfile" || rm -f "$passfile.new.$fake_uniqueness_safety"
fi
prev_gpg_recipients="${GPG_RECIPIENTS[@]}"
1'>Clean up git handling.Jason A. Donenfeld2-42/+28 Get rid of push/pull shortcuts, as they weren't widely used. Add contents to repo on git init. Centralize git add logic, and make it less error prone. 2012-09-19Fix git regression.Jason A. Donenfeld1-1/+1 2012-09-18Add additional information from KeepassX xmlJuhamatti Niemelä1-3/+15 Import passwords as multiline entries with password in the first line. Rest contains following data if they exist in the entry element of the xml file: - username - url - comment 2012-09-18Copyright and licensing info to keepassx2pass scriptJuhamatti Niemelä1-0/+4 2012-09-18Quote the template.Jason A. Donenfeld1-1/+1 2012-09-18Better dependency list.Jason A. Donenfeld1-1/+10 2012-09-18Make recursive make silent.Jason A. Donenfeld1-1/+1 2012-09-18Quote the program name.Jason A. Donenfeld1-4/+4 2012-09-17Abstract potentially platform specific commands into their own commands.Jason A. Donenfeld4-72/+97 2012-09-16Support recursive and forced removal.Jason A. Donenfeld2-12/+28 Laurent asked for this. Reported-by: Laurent Ghigonis <laurent@p1sec.com> 2012-09-16Small stylistic things.Jason A. Donenfeld1-9/+9 Reported-by: Laurent Ghigonis <laurent@p1sec.com> 2012-09-15Use --force flag in keepassx import.Jason A. Donenfeld1-1/+1