From b988e13c85cf1bce5f025eb08d14199a4658d57c Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Mon, 27 Feb 2012 22:39:59 -0300 Subject: Taking into account .asc extension in recipient files --- lib/keyringer/functions | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/keyringer/functions b/lib/keyringer/functions index 8166370..04807e6 100644 --- a/lib/keyringer/functions +++ b/lib/keyringer/functions @@ -369,6 +369,7 @@ function keyringer_set_recipients { keyringer_set_default_recipients else candidate="$1" + candidate_no_extension="`echo $1 | sed -e 's/.asc$//'`" # Find the first matching recipient while [ ! -z "$candidate" ] && [ "$candidate" != "." ] && [ "$candidate" != "/" ]; do @@ -376,6 +377,10 @@ function keyringer_set_recipients { RECIPIENTS_FILE="$RECIPIENTS/$candidate" RECIPIENTS_FILE_BASE="$RECIPIENTS_BASE/$candidate" return + elif [ -e "$RECIPIENTS/$candidate_no_extension" ]; then + RECIPIENTS_FILE="$RECIPIENTS/$candidate_no_extension" + RECIPIENTS_FILE_BASE="$RECIPIENTS_BASE/$candidate_no_extension" + return fi candidate="`dirname $candidate`" -- cgit v1.2.3