diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2012-02-27 22:39:59 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2012-02-27 22:39:59 -0300 |
commit | b988e13c85cf1bce5f025eb08d14199a4658d57c (patch) | |
tree | 2c5cdcc0703bcf1473a458551bec9028d1978eec | |
parent | b26b353d9acc6fed4688beccfb5a1055f2dbdc2e (diff) | |
download | keyringer-b988e13c85cf1bce5f025eb08d14199a4658d57c.tar.gz keyringer-b988e13c85cf1bce5f025eb08d14199a4658d57c.tar.bz2 |
Taking into account .asc extension in recipient files
-rw-r--r-- | lib/keyringer/functions | 5 |
1 files changed, 5 insertions, 0 deletions
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`" |