Bug - Fixed Non-default browser fails to load in OSX

lostcalpolydude

Developer
Staff member
Based on a comment someone made to me a little while back, I decided to try changing my default web browser, and set preferredWebBrowser to a value that didn't match it, and see how mafia handled opening the browser. This is running 10.6.4. Opera opened just fine. Google Chrome fails due to the space in the program name, and I couldn't figure out how to fix that. When shouldRelaunch is true, using the full path to open Safari doesn't work right because it adds file:// in front of the URL. For Firefox, the executable is firefox-bin, so the full-path address wasn't pointing to it (older versions of Firefox just had firefox as the executable). I found that removing the check to see if the browser is already open and always using "open -a" works for Firefox and Safari and doesn't break anything with opening Opera. It looks like "open" was the same back in 10.4 based on the man entry, but I can't very easily test that it works there. Patch attached with what I came up with.

From trying to directly use Terminal commands, I found that
Code:
open -a google\ chrome
open -a "google chrome"
open -a 'google chrome'
all work, but I couldn't get any of those to be run by exec and I don't know enough about debugging to figure out what I was actually accomplishing with my attempts.
 

Attachments

  • BrowserLauncher.patch
    1.3 KB · Views: 49

Veracity

Developer
Staff member
In revision 8640, holatuwol completely replaced BrowserLauncher.getMacintoshExecutable().
Could you retry with a current build, please? Thanks.
 
Top