From d6ace9471fbeb4c6c57f803d870accd8b11c7d2f Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Sun, 10 Nov 2013 20:38:46 -0200 Subject: Fixing encryption for files with spaces (closes #20) --- lib/keyringer/actions/encrypt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'lib/keyringer/actions') diff --git a/lib/keyringer/actions/encrypt b/lib/keyringer/actions/encrypt index cc73b55..6b9c061 100755 --- a/lib/keyringer/actions/encrypt +++ b/lib/keyringer/actions/encrypt @@ -9,12 +9,12 @@ source "$LIB" || exit 1 # Aditional parameters if [ ! -z "$3" ]; then - UNENCRYPTED_FILE="$2" - shift 2 - keyringer_get_new_file "$*" + shift 1 + UNENCRYPTED_FILE="$*" + keyringer_get_new_file $* if [ ! -f "$UNENCRYPTED_FILE" ]; then - echo "Error: cannot encrypted $UNENCRYPTED_FILE: file not found." + echo "Error: cannot encrypt $UNENCRYPTED_FILE: file not found." exit 1 fi else @@ -36,7 +36,7 @@ if [ "$BASENAME" == "encrypt" ]; then fi fi -$GPG --use-agent --armor -e -s $(keyringer_recipients "$RECIPIENTS_FILE") --yes --output "$KEYDIR/$FILE" $UNENCRYPTED_FILE +$GPG --use-agent --armor -e -s $(keyringer_recipients "$RECIPIENTS_FILE") --yes --output "$KEYDIR/$FILE" "$UNENCRYPTED_FILE" err="$?" -- cgit v1.2.3