User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:220.127.116.11) Gecko/20080404 Iceweasel/18.104.22.168 (Debian-22.214.171.124-2) Build Identifier: version 126.96.36.199 (20080420) When specifying an attachment on the command line, the filename gets truncated if it contains a comma. Attaching from the GUI is not a problem. OpenOffice.org's send as xxxx functionality uses the command line as follows: "thunderbird" "-compose" "attachment=file:///path/to/file, with commas.pdf" The filename listed in the attachments pane contains no text after or including the comma. Attempting to send results in an error since the file can't be found. Reproducible: Always Steps to Reproduce: 1. Create a file "hi,everybody.odt" 2. thunderbird -compose "attachment=file:///home/user/hi,everybody.odt" 3. Enter an email address and subject. Hit send Actual Results: Attachment filename gets truncated to "hi" and fails to send. Expected Results: Attachment filename should be "hi,everybody.odt" and should send properly.
I can reproduce your observation, however this appears to be a syntax issue with the command line rather than an actual truncation of the file path. In http://developer.mozilla.org/en/docs/Command_Line_Options#Syntax_Rules the comma indicates a separation of options, all of which are passed as a single argument enclosed in "" quotes. Using the comma within a file name gives me an error message "An error occurred while creating a message compose window" when putting the file URI into single quotes as instructed by the Syntax Rules. Tested on 188.8.131.52 (Windows/20080421), yet have to check in trunk.
Ok, now I see what's happening. If you have a sequence "option='test1,test2'" in the command line, it will treat this as a parameter of type "option" where the arguments for that option are "test1" and "test2". You can try this with "attachment='file:...,file:...'" and you get two attachments. Thus, without the single-quoting inside the "attachment" parameter, the "everybody.odt" part is used as another option, which doesn't match anything though. If you use the '-quotes, the first argument is a correct "file:" URI, whereas "everybody.odt" is an incorrect URI, therefore giving an error. The question is whether or not this is actually a bug, given that the syntax rules do not allow to specify arguments to an option which contain commas due to the ambiguity (we would have three levels of comma then).
Sorry for not seeing this earlier, but - of course - you can define a comma in an URI so that it doesn't get confused with the option/argument separators, just use the hexadecimal equivalent: thunderbird -compose "attachment='file:///home/user/hi%2Ceverybody.odt'" This should do it. -> WFM
Status: UNCONFIRMED → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → WORKSFORME
Please see my post at 743579
You need to log in before you can comment on or make changes to this bug.