summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2013-12-10 17:25:07 -0200
committerSilvio Rhatto <rhatto@riseup.net>2013-12-10 17:25:07 -0200
commit47ea7016dc8e5cd8dff3603243aa95fa5f31dbff (patch)
treeacaece7b308fc1ce18d11372eb974c8990c769d2
parenta8c1608fee73578358c3c17f76b44f0857c38ac0 (diff)
downloadkeyringer-47ea7016dc8e5cd8dff3603243aa95fa5f31dbff.tar.gz
keyringer-47ea7016dc8e5cd8dff3603243aa95fa5f31dbff.tar.bz2
Using RELATIVE_PATH directly at keyringer_get_file and keyringer_get_new_file
-rwxr-xr-xlib/keyringer/actions/append2
-rwxr-xr-xlib/keyringer/actions/decrypt2
-rwxr-xr-xlib/keyringer/actions/del2
-rwxr-xr-xlib/keyringer/actions/edit2
-rwxr-xr-xlib/keyringer/actions/encrypt4
-rwxr-xr-xlib/keyringer/actions/recrypt2
-rwxr-xr-xlib/keyringer/functions4
7 files changed, 9 insertions, 9 deletions
diff --git a/lib/keyringer/actions/append b/lib/keyringer/actions/append
index 818a7ac..fbb6c1c 100755
--- a/lib/keyringer/actions/append
+++ b/lib/keyringer/actions/append
@@ -8,7 +8,7 @@ LIB="`dirname $0`/../functions"
source "$LIB" || exit 1
# Get file
-keyringer_get_file "$RELATIVE_PATH/$2"
+keyringer_get_file "$2"
# Only display directions if we're running append, not append-batch
if [ "$BASENAME" == "append" ]; then
diff --git a/lib/keyringer/actions/decrypt b/lib/keyringer/actions/decrypt
index aab7881..2b1401c 100755
--- a/lib/keyringer/actions/decrypt
+++ b/lib/keyringer/actions/decrypt
@@ -8,7 +8,7 @@ LIB="`dirname $0`/../functions"
source "$LIB" || exit 1
# Get file
-keyringer_get_file "$RELATIVE_PATH/$2"
+keyringer_get_file "$2"
# Decrypt
$GPG --quiet --use-agent -d "$KEYDIR/$FILE"
diff --git a/lib/keyringer/actions/del b/lib/keyringer/actions/del
index a2514d7..d160ac4 100755
--- a/lib/keyringer/actions/del
+++ b/lib/keyringer/actions/del
@@ -8,7 +8,7 @@ LIB="`dirname $0`/../functions"
source "$LIB" || exit 1
# Get file
-keyringer_get_file "$RELATIVE_PATH/$2"
+keyringer_get_file "$2"
# Set options
if [ ! -z "$3" ]; then
diff --git a/lib/keyringer/actions/edit b/lib/keyringer/actions/edit
index d303bd5..9a3e488 100755
--- a/lib/keyringer/actions/edit
+++ b/lib/keyringer/actions/edit
@@ -8,7 +8,7 @@ LIB="`dirname $0`/../functions"
source "$LIB" || exit 1
# Get file
-keyringer_get_file "$RELATIVE_PATH/$2"
+keyringer_get_file "$2"
# Set recipients file
keyringer_set_recipients "$FILE"
diff --git a/lib/keyringer/actions/encrypt b/lib/keyringer/actions/encrypt
index 526eaa1..0a40bc1 100755
--- a/lib/keyringer/actions/encrypt
+++ b/lib/keyringer/actions/encrypt
@@ -65,7 +65,7 @@ if [ ! -z "$3" ]; then
FILE="$BASEPATH"
fi
- keyringer_get_new_file $RELATIVE_PATH/$FILE
+ keyringer_get_new_file $FILE
if [ ! -e "$UNENCRYPTED_FILE" ]; then
echo "Error: cannot encrypt $UNENCRYPTED_FILE: path not found."
@@ -74,7 +74,7 @@ if [ ! -z "$3" ]; then
else
UNENCRYPTED_FILE="-"
shift
- keyringer_get_new_file $RELATIVE_PATH/$*
+ keyringer_get_new_file $*
fi
# Set recipients file
diff --git a/lib/keyringer/actions/recrypt b/lib/keyringer/actions/recrypt
index 7d5c6ae..014fef7 100755
--- a/lib/keyringer/actions/recrypt
+++ b/lib/keyringer/actions/recrypt
@@ -9,7 +9,7 @@ source "$LIB" || exit 1
function keyringer_recrypt {
# Get file
- keyringer_get_file "$RELATIVE_PATH/$1"
+ keyringer_get_file "$1"
# Set recipients file
keyringer_set_recipients "$FILE"
diff --git a/lib/keyringer/functions b/lib/keyringer/functions
index f387c46..872dac9 100755
--- a/lib/keyringer/functions
+++ b/lib/keyringer/functions
@@ -398,7 +398,7 @@ function keyringer_upgrade {
# Get a file argument
function keyringer_get_file {
- FILE="$(keyringer_filename "$1")"
+ FILE="$(keyringer_filename "$RELATIVE_PATH/$1")"
if [ -z "$FILE" ]; then
keyringer_action_usage
@@ -427,7 +427,7 @@ function keyringer_get_new_file {
fi
# Complete file name
- FILE="$(keyringer_filename "$FILE")"
+ FILE="$RELATIVE_PATH/$(keyringer_filename "$FILE")"
if [ -z "$*" ]; then
keyringer_action_usage