From 46a0dc019b1e80a524d183168e47048b253348fe Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Sun, 21 Aug 2022 19:21:40 -0300 Subject: Fix(xclip): avoid 'Error: target STRING not available' (3) --- lib/keyringer/actions/xclip | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/keyringer/actions/xclip b/lib/keyringer/actions/xclip index 0e36dae..d1d85b5 100755 --- a/lib/keyringer/actions/xclip +++ b/lib/keyringer/actions/xclip @@ -42,7 +42,7 @@ clip() { # so we axe it here: qdbus org.kde.klipper /klipper org.kde.klipper.klipper.clearClipboardHistory &>/dev/null - echo "$before" | base64 -d | $xclip + echo "$before" | base64 -d | $xclip 2> /dev/null ) & disown echo "Copied $2 to clipboard. Will clear in 45 seconds." } -- cgit v1.2.3 From 805f3ecc55897fe28d7054ecf7b29101582ceb75 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Mon, 22 Aug 2022 13:23:07 -0300 Subject: Fix(xclip): avoid 'Error: target STRING not available' (4) --- lib/keyringer/actions/xclip | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/keyringer/actions/xclip b/lib/keyringer/actions/xclip index d1d85b5..ff82cc1 100755 --- a/lib/keyringer/actions/xclip +++ b/lib/keyringer/actions/xclip @@ -16,14 +16,14 @@ clip() { #local xclip="xclip -selection clipboard" local xclip="xclip" - before="$($xclip -o | base64)" + before="$($xclip -o 2> /dev/null | base64)" # Avoid "Error: target STRING not available" # https://github.com/astrand/xclip/issues/38 echo "$RANDOM" | $xclip &> /dev/null # Copy text into clipboard - echo -n "$1" | $xclip + echo -n "$1" | $xclip &> /dev/null # Cleanup procedure ( -- cgit v1.2.3 From 5e9564f62128c681d8bbc3c319051f01b0ea5123 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Sat, 11 Mar 2023 13:57:58 -0300 Subject: Fix: edit: check whether decryption suceeded --- lib/keyringer/actions/edit | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib') 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" -- cgit v1.2.3