make path first, in case the part doesn't exist.

make path first, in case the part doesn't exist.
This commit is contained in:
neil 2016-04-26 23:12:35 +08:00
commit 3bf6a399a5

View file

@ -137,8 +137,10 @@ if [ "$type" = 'sftp' ]; then
if [ -z $port ]; then
port=22
fi
sftmpdir="$path/vst.bK76A9SUkt"
sftpc "mkdir $sftmpdir" "rmdir $sftmpdir" > /dev/null 2>&1
if sftpc "mkdir $path" > /dev/null 2>&1 ; then
sftmpdir="$path/vst.bK76A9SUkt"
sftpc "mkdir $sftmpdir" "rmdir $sftmpdir" > /dev/null 2>&1
fi
rc=$?
if [[ "$rc" != 0 ]]; then
case $rc in