fixin g filename sanitation
This commit is contained in:
parent
e5dcc81930
commit
046ba029dc
10
ppss.sh
10
ppss.sh
@ -906,7 +906,15 @@ download_item () {
|
|||||||
log DEBUG "Transfering item $ITEM_NO_PATH to local disk."
|
log DEBUG "Transfering item $ITEM_NO_PATH to local disk."
|
||||||
if [ "$SECURE_COPY" == "1" ] && [ ! -z "$SSH_SERVER" ]
|
if [ "$SECURE_COPY" == "1" ] && [ ! -z "$SSH_SERVER" ]
|
||||||
then
|
then
|
||||||
ITEM_ESCAPED=`echo "$ITEM" | sed s:\\ :\\\\\\\\\ :g`
|
#ITEM_ESCAPED=`echo "$ITEM" | sed s:\\ :\\\\\\\\\ :g`
|
||||||
|
ITEM_ESCAPED=`echo "$ITEM" | \
|
||||||
|
sed s/\\\//\\\\\\ /g | \
|
||||||
|
sed s/\\ /\\\\\\\\\\\\\\ /g | \
|
||||||
|
sed s/\\'/\\\\\\\\\\\\\\'/g | \
|
||||||
|
sed s/\&/\\\\\\\\\\\\\\&/g | \
|
||||||
|
sed s/\(/\\\\\\\\\\(/g | \
|
||||||
|
sed s/\)/\\\\\\\\\\)/g `
|
||||||
|
|
||||||
scp -q $SSH_OPTS $SSH_KEY $USER@$SSH_SERVER:"$ITEM_ESCAPED" ./$PPSS_LOCAL_TMPDIR
|
scp -q $SSH_OPTS $SSH_KEY $USER@$SSH_SERVER:"$ITEM_ESCAPED" ./$PPSS_LOCAL_TMPDIR
|
||||||
log DEBUG "Exit code of remote transfer is $?"
|
log DEBUG "Exit code of remote transfer is $?"
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user