From e080112efe49b42828234a5fc86a9f6200eb383e Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Thu, 30 Dec 2010 23:33:43 +0100 Subject: fix uploading of filenames containing a comma Signed-off-by: Florian Pritz --- fb.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3-24-g4f1b