diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2023-03-11 13:57:58 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2023-03-11 13:57:58 -0300 |
commit | 5e9564f62128c681d8bbc3c319051f01b0ea5123 (patch) | |
tree | b7660888058bab4d759e0c7da0198b9040029200 | |
parent | 805f3ecc55897fe28d7054ecf7b29101582ceb75 (diff) | |
download | keyringer-5e9564f62128c681d8bbc3c319051f01b0ea5123.tar.gz keyringer-5e9564f62128c681d8bbc3c319051f01b0ea5123.tar.bz2 |
Fix: edit: check whether decryption suceeded
-rwxr-xr-x | lib/keyringer/actions/edit | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/keyringer/actions/edit b/lib/keyringer/actions/edit index a480eea..ae4f4b0 100755 --- a/lib/keyringer/actions/edit +++ b/lib/keyringer/actions/edit @@ -24,6 +24,12 @@ keyringer_set_tmpfile $BASENAME.$EXTENSION # Decrypt the information to the file $GPG --yes -o "$TMPWORK" --use-agent -d "$KEYDIR/$FILE" +# Check whether decryption suceeded +if [ "$?" != "0" ]; then + echo "Error decrypting $FILE, aborting" + exit 1 +fi + # Action check if [ "$BASENAME" == "edit" ]; then APP="$EDITOR" |