Fixing file name excape bug...

This commit is contained in:
Louwrentius 2010-02-07 19:14:48 +00:00
parent 2356f6bb0a
commit 081337c5b2
4 changed files with 45 additions and 13 deletions

11
ppss
View File

@ -1133,11 +1133,6 @@ upload_item () {
ITEM="$1" ITEM="$1"
ITEMDIR="$2" ITEMDIR="$2"
if [ "$TRANSFER_TO_SLAVE" == "0" ]
then
log DEBUG "File transfer is disabled."
return 0
fi
log DEBUG "Uploading item $ITEM." log DEBUG "Uploading item $ITEM."
if [ "$SECURE_COPY" == "1" ] if [ "$SECURE_COPY" == "1" ]
@ -1482,12 +1477,18 @@ commando () {
escape_item "$DIRNAME" escape_item "$DIRNAME"
ITEM_OUTPUT_DIR="$REMOTE_OUTPUT_DIR/$ITEM_ESCAPED" ITEM_OUTPUT_DIR="$REMOTE_OUTPUT_DIR/$ITEM_ESCAPED"
if [ "$TRANSFER_TO_SLAVE" == "0" ]
then
log DEBUG "File transfer is disabled."
else
exec_cmd "mkdir -p $ITEM_OUTPUT_DIR" exec_cmd "mkdir -p $ITEM_OUTPUT_DIR"
if [ "$DIRNAME" == "." ] if [ "$DIRNAME" == "." ]
then then
DIRNAME="" DIRNAME=""
fi fi
upload_item "$PPSS_LOCAL_OUTPUT/$ITEM_NO_PATH" "$DIRNAME" upload_item "$PPSS_LOCAL_OUTPUT/$ITEM_NO_PATH" "$DIRNAME"
fi
elapsed "$BEFORE" "$AFTER" >> "$ITEM_LOG_FILE" elapsed "$BEFORE" "$AFTER" >> "$ITEM_LOG_FILE"
echo -e "" >> "$ITEM_LOG_FILE" echo -e "" >> "$ITEM_LOG_FILE"

View File

@ -3,7 +3,7 @@
DEBUG="$1" DEBUG="$1"
VERSION=2.55 VERSION=2.55
TMP_DIR="ppss" TMP_DIR="ppss"
PPSS=ppss PPSS=./ppss
PPSS_DIR=ppss_dir PPSS_DIR=ppss_dir
cleanup () { cleanup () {
@ -29,14 +29,12 @@ parseJobStatus () {
oneTimeSetUp () { oneTimeSetUp () {
NORMALTESTFILES=`echo test-{a..z}`
SPECIALTESTFILES="\'file-!@#$%^&*()_+=-0987654321~\' \'file-/\<>?:;'{}[]\' file-/\/\:\/!@#$%^&*()_+=-0987654321~ file-/\<>?:;'{}[] http://www.google.nl ftp://storage.nl"
JOBLOG=./$PPSS_DIR/job_log JOBLOG=./$PPSS_DIR/job_log
INPUTFILENORMAL=test-normal.input INPUTFILENORMAL=test-normal.input
INPUTFILESPECIAL=test-special.input INPUTFILESPECIAL=test-special.input
LOCALOUTPUT=ppss_dir/PPSS_LOCAL_OUTPUT LOCALOUTPUT=ppss_dir/PPSS_LOCAL_OUTPUT
REMOVEFILES="$INPUTFILENORMAL $INPUTFILESPECIAL $PPSS_DIR test-ppss-*" REMOVEFILES="$PPSS_DIR test-ppss-*"
cleanup cleanup

26
test-normal.input Normal file
View File

@ -0,0 +1,26 @@
test-a
test-b
test-c
test-d
test-e
test-f
test-g
test-h
test-i
test-j
test-k
test-l
test-m
test-n
test-o
test-p
test-q
test-r
test-s
test-t
test-u
test-v
test-w
test-x
test-y
test-z

7
test-special.input Normal file
View File

@ -0,0 +1,7 @@
\'file-!@#$%^&*()_ +=-0987654321~\'
\'file-/\<>?:;'{}[]\'
file-/\/\:\/!@#$%^&*()_+=-0987654321~
file-/\<>?:;'{}[]
http://www.google.nl
ftp://storage.nl
./flac/Beethoven Overtures CD2/01 - Beethoven, Lv - Leonore I - Op.138.flac