From 7b8d9672db97bdbb7b246437a0e2ee24e029ec11 Mon Sep 17 00:00:00 2001 From: Louwrentius Date: Sun, 22 Mar 2009 10:01:36 +0000 Subject: [PATCH] fixin g filename sanitation --- branches/distributed-ppss/ppss.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/branches/distributed-ppss/ppss.sh b/branches/distributed-ppss/ppss.sh index 988a633..2bdec53 100755 --- a/branches/distributed-ppss/ppss.sh +++ b/branches/distributed-ppss/ppss.sh @@ -906,7 +906,15 @@ download_item () { log DEBUG "Transfering item $ITEM_NO_PATH to local disk." if [ "$SECURE_COPY" == "1" ] && [ ! -z "$SSH_SERVER" ] 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 log DEBUG "Exit code of remote transfer is $?" else