diff options
author | Florian Pritz <bluewind@xssn.at> | 2010-12-30 23:33:43 +0100 |
---|---|---|
committer | Florian Pritz <bluewind@xssn.at> | 2010-12-30 23:42:15 +0100 |
commit | e080112efe49b42828234a5fc86a9f6200eb383e (patch) | |
tree | af2eaf6be44708f87d80086ffb355652b1437853 | |
parent | c254396521ea0aa112bcbe9fe53e532cda478838 (diff) |
fix uploading of filenames containing a comma
Signed-off-by: Florian Pritz <bluewind@xssn.at>
-rw-r--r-- | fb.in | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -59,7 +59,8 @@ do_upload() { fi fi CURLOPTS="-# -n -L -A $USERAGENT $EXTRA" - if [ `stat -c %s -- "$file"` -eq "0" ]; then + if [ `stat -c %s -- "$file"` -eq "0" ] || echo "$file" | grep -F -q ","; then + basefilename=`echo "$basefilename" | tr -d ,` if ! curl $CURLOPTS -F "file=@-;filename=$basefilename" "$PASTEBIN/file/do_upload" < "$file" > $TMPFILE; then EXITCODE=1 return 1 |