Comment 3 for bug 488857

Revision history for this message
In , Daniel Holbert (dholbert) wrote :

Here's the line of Mozilla code that comes into play here:

> 460 gtk_print_settings_set(mPrintSettings, GTK_PRINT_SETTINGS_OUTPUT_URI, url.get());
http://mxr.mozilla.org/mozilla-central/source/widget/src/gtk2/nsPrintSettingsGTK.cpp#460

In a fresh profile, that "url.get()" call yields something like "file:///your/working/directory/mozilla.ps". (and yet that value is lost at some point -- we still run into this bug)

I've tried replacing the "url.get()" token there with some hard-coded string constants, and I've learned the following -- it looks like we hit this bug whenever we pass in a string that contains a colon character. When I exclude the colon, then the print dialog ends up using the correct filename (albeit with no path information).

e.g. "/random/directory/foo.ps" and "file///random/directory/foo.ps" both end up presenting print dialogs that offer to save "foo.ps" in the current working directory. And if I add a colon (yielding "file:///random/directory/foo.ps"), then the print dialog buggily reverts to naming the file ".ps".

I'm not sure how to debug this further -- I haven't hooked up GDB to step through the GTK library's code before, and I'm not immediately sure what I'd need to do for that.