Closed Bug 678368 Opened 14 years ago Closed 6 years ago

Thunderbird doesn't accept attachment filename command line arguments correctly when it is already running.

Categories

(Thunderbird :: Untriaged, defect)

x86
Windows Vista
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: a101795, Unassigned)

References

Details

User Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.19) Gecko/20110707 Firefox/3.6.19 (.NET CLR 3.5.30729) Build ID: 20110707195905 Steps to reproduce: I run this command to compose a message : C:\Program Files\Mozilla Thunderbird\thunderbird.exe -compose to='mozilla@thunderbird.com',subject='This is a test',attachment='C:\Thunder Bird\historical event.pdf,C:\EVENTS\abcdΠefgh\PHOTOS\9000_20071102_102112_Color_L_03.tif' All things are OK if Thunderbird wasn't running at the time. BUT if a Thunderbird process IS running, I get "weird" results... Actual results: if Thunderbird ISN'T running I get the 2 attachments correct: C:\Thunder Bird\historical event.pdf C:\EVENTS\abcdΠefgh\PHOTOS\9000_20071102_102112_Color_L_03.tif if Thunderbird IS running and I execute the command I get an attachment that doesn't exists and is a merged version of the 2 attacments. Specificaly I get this: C:\Thunder Bird\historical efgh\PHOTOS\9000_20071102_102112_Color_L_03.tif Expected results: I narrow it down to the capital greek letter pi that is included in the path of the 2nd attacment. C:\EVENTS\abcdΠefgh\ (between abcd and efgh) This is the letter: http://www.fileformat.info/info/unicode/char/3a0/index.htm I don't know if this is happening with other letters to (greek or not). The "weird" thing is that the attachments are messed up ONLY if thunderbird's process is already running. I am developing a program and this BUG made me incorporate a routine to Kill thunderbird's process before execution. That is not a good thing. :-(
decent chance this is a duplicate
Whiteboard: dupeme?
Can you provide a link with the similar bug? Fat chance for this to be a dupe since it's very specific and hard to find. What is with the greek letter "pi"? It triggers some internal code or it's something like an escape character?
More likely, there is some bad charset conversion going on somewhere. Like in the command line handler: #ifdef XP_WIN CopyUTF8toUTF16(nsDependentCString(arg), warg); #else NS_CopyNativeToUnicode(nsDependentCString(arg), warg); #endif
This bug is still present in 6.01 version that I just installed. I hope someone fix it some day. I hate the idea that I have a routine in my program that checks if thunderbird is running and kill its process if it does.
(In reply to GreekSage from comment #4) > This bug is still present in 6.01 version that I just installed. > I hope someone fix it some day. want to give it a try ?
Still present in 7.01 >>want to give it a try ? Hi Ludovic. How can I do that? Can you point me to the right direction?
(In reply to GreekSage from comment #6) > Still present in 7.01 > > > >>want to give it a try ? > > Hi Ludovic. > How can I do that? > Can you point me to the right direction? Of course. And sorry for the late reply - I'm lagging a bit behind in bugmail. Here is a list of steps you need to follow : 1) build thunderbird 2) Find how we handle command line 3) Debug the issue. 4) fix it. 5) Create a patch 6) Attach the patch to this bug 7) ask for review 8) address review comments if any 9) Add the chekin-needed keyword 1 is documented at https://developer.mozilla.org/en/Build_Documentation and https://developer.mozilla.org/en/Simple_Thunderbird_build 2 is probably in https://mxr.mozilla.org/comm-central/source/mailnews/base/src/nsMailNewsCommandLineHandler.js but I'm not too sure. 5 is documented at https://developer.mozilla.org/En/Creating_a_patch and http://blog.bonardo.net/2010/06/22/so-youre-about-to-use-checkin-needed For steps after 5 I'll probably help by following the bug. For steps 3 and 4 you might want to ask some help on #maildev on irc.mozilla.org or on news://mozilla.dev.apps.thunderbird . You can also ask more questions here.
Whiteboard: dupeme?
(In reply to GreekSage from comment #4) > I hate the idea that I have a routine in my program that checks if > thunderbird is running and kill its process if it does. Tb accepts two formats in "attachment=". > http://kb.mozillazine.org/Command_line_arguments_%28Thunderbird%29 > "attachment' : specify the directory and the name of an attachment > the value should be a file:// url, properly encoded > with tb3+, you can alternatively use the absolute file name (unencoded) Does primary "file: url" work as expected? (a) abcdΠefgh in utf-8, and escaped (b) abcdΠefgh in system charset(windows-125x, iso-8859-x, ...), and escaped To see file: url format used by Mozilla, open file named abcdΠefgh.TXT by Firefox, or create file link in html mail using Tb, please.
Just before Firefox 3.0, some irresponsible person made a half-baked change to command-line processing that resulted in all command line arguments being disabled when running on Windows. I complained about it at the time in bug 355889 comment 12, and was told to shut up or else (see later comments in that bug).
Summary: Thunderbird doesn't accept command line arguments correctly when it is already running. → Thunderbird doesn't accept attachment filename command line arguments correctly when it is already running.
Component: General → Untriaged
See Also: → 900117

Another old and probably invalid bug. Not that it wasn't valid at the time.

If no one objects I'll be closing this on the 20th of May

Assignee: nobody → benjamin
Status: UNCONFIRMED → RESOLVED
Closed: 6 years ago
Resolution: --- → INACTIVE
Assignee: benjamin → nobody
Resolution: INACTIVE → INVALID

Before closing such a bug, it would be helpful to test it. Given the paths mentioned in comment #0, I tried this on Windows with no problem:

"C:\Program Files\Mozilla Thunderbird 60\thunderbird.exe" -compose to='mozilla@thunderbird.com',subject='This is a test',attachment='d:\Desktop\BVG-Preise-2016.pdf,d:\Desktop\ätreeherder.txt'

Note the Umlaut ä which is on the local ANSI codepage windows-1252 for my system. It even works with:

"C:\Program Files\Mozilla Thunderbird 60\thunderbird.exe" -compose to='mozilla@thunderbird.com',subject='This is a test',attachment='d:\Desktop\BVG-Preise-2016.pdf,d:\Desktop\Πtreeherder.txt'

Note the "Π".

It even works with

D:\Desktop>"C:\Program Files\Mozilla Thunderbird 60\thunderbird.exe" -compose to='mozilla@thunderbird.com',subject='This is a test',attachment='d:\Desktop\BVG-Preise-2016.pdf,d:\Desktop\テtreeherder.txt'

and the Japanese character is most certainly not on the local ANSI codepage.

So whatever didn't work in 2011 works now.

Resolution: INVALID → WORKSFORME
You need to log in before you can comment on or make changes to this bug.