From: Silvio Rhatto Date: Sun, 29 Nov 2015 14:34:06 +0000 (-0200) Subject: Ensure destination path exists at mv action X-Git-Tag: 0.4.0~7 X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=cf4c25c4b2ff8d7b4a80197a661aa8f32b7e0eeb;p=keyringer.git Ensure destination path exists at mv action --- 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"