aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2015-11-29 12:34:06 -0200
committerSilvio Rhatto <rhatto@riseup.net>2015-11-29 12:34:06 -0200
commitcf4c25c4b2ff8d7b4a80197a661aa8f32b7e0eeb (patch)
tree5db00065104d249b6d04c89953315b040507d4b3
parent8c3e30a9666fe60042a90de72c21cb4eff114072 (diff)
downloadkeyringer-cf4c25c4b2ff8d7b4a80197a661aa8f32b7e0eeb.tar.gz
keyringer-cf4c25c4b2ff8d7b4a80197a661aa8f32b7e0eeb.tar.bz2
Ensure destination path exists at mv action
-rwxr-xr-xlib/keyringer/actions/mv3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/keyringer/actions/mv b/lib/keyringer/actions/mv
index 2324145..e31eb85 100755
--- a/lib/keyringer/actions/mv
+++ b/lib/keyringer/actions/mv
@@ -24,5 +24,8 @@ if ! echo "$ORIG" | grep -q '*' && [ ! -e "$KEYDIR/$RELATIVE_PATH/$ORIG" ]; then
exit 1
fi
+# Ensure destination path exists
+mkdir -p "`dirname $KEYDIR/$RELATIVE_PATH/$DEST`"
+
# Run move command
keyringer_exec git "$BASEDIR" mv "keys/$RELATIVE_PATH/$ORIG" "keys/$FILE"