Comment 12 for bug 1401454

Revision history for this message
In , Benjamin Smedberg (Mozilla) [:bs] (benjamin-smedbergs) wrote :

Comment on attachment 412493
Patch for Bug 377630.

This patch is incorrect for a bunch of different reasons:

* you hardcode thunderbird- into generic platform code which is shared with all mozilla apps.

* What happens if the directory doesn't exist? Do all the users of this code properly create the directory before attempting to stick files in it?

* the nsCAutoString initializer should probably be = NS_LITERAL_CSTRING("/tmp/")

I'm surprised that the path ends with a slash: that sounds unnecessarily complicated because the slash will be stripped by NS_NewNativeLocalFile anyway.

This must have tests.