summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xssn.at>2010-12-30 23:33:43 +0100
committerFlorian Pritz <bluewind@xssn.at>2010-12-30 23:42:15 +0100
commite080112efe49b42828234a5fc86a9f6200eb383e (patch)
treeaf2eaf6be44708f87d80086ffb355652b1437853
parentc254396521ea0aa112bcbe9fe53e532cda478838 (diff)
fix uploading of filenames containing a comma
Signed-off-by: Florian Pritz <bluewind@xssn.at>
-rw-r--r--fb.in3
1 files changed, 2 insertions, 1 deletions
diff --git a/fb.in b/fb.in
index c781c74..b91b384 100644
--- a/fb.in
+++ b/fb.in
@@ -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