aboutsummaryrefslogtreecommitdiff
path: root/lib/keyringer/functions
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2013-11-14 14:36:46 -0200
committerSilvio Rhatto <rhatto@riseup.net>2013-11-14 14:36:46 -0200
commit1340e329768f8f022c6d5cd91e512380d883a5ac (patch)
tree87c6cde26d85a21d66b8208e42f2bd0aed274eb1 /lib/keyringer/functions
parent8857d60617c00553aaab7f06153b17699c860e96 (diff)
downloadkeyringer-1340e329768f8f022c6d5cd91e512380d883a5ac.tar.gz
keyringer-1340e329768f8f022c6d5cd91e512380d883a5ac.tar.bz2
Set file extension for encrypted files
Diffstat (limited to 'lib/keyringer/functions')
-rwxr-xr-xlib/keyringer/functions9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/keyringer/functions b/lib/keyringer/functions
index b39b8ec..40e13aa 100755
--- a/lib/keyringer/functions
+++ b/lib/keyringer/functions
@@ -118,13 +118,16 @@ function keyringer_set_tmpfile {
exit 1
fi
+ # Set base temp folder
+ local tmp="$BASEDIR/tmp"
+
if [ -z "$1" ]; then
- template="$BASEDIR/tmp/keyringer.XXXXXXXXXX"
+ template="$tmp/keyringer.XXXXXXXXXX"
else
- template="$BASEDIR/tmp/$1.XXXXXXXXXX"
+ template="$tmp/XXXXXXXXXX.$1"
fi
- mkdir -p "$BASEDIR/tmp"
+ mkdir -p "$tmp"
keyringer_git_ignore 'tmp/*'
if [ "$2" == "-d" ]; then