juce_launchFile fail with certain URL types


#1

Howdy,

I was having some trouble with URL::launchInDefaultBrowser() failing on the mac with any URLs other than http:// ones. A little digging discovered this line in juce_mac_Files.cpp in function juce_launchFile:

if (fileName.startsWithIgnoreCase (T("http:"))) {

Could this be tweaked so that it launches https and ftp sessions also?? (and preferably all the other ones like realaudio, iTunes links, etc too?)

For my current purposes I’ve frigged it with:

if (fileName.startsWithIgnoreCase (T("http:")) || fileName.startsWithIgnoreCase (T("https:")) || fileName.startsWithIgnoreCase (T("ftp:")) ) {

but it would be great if URL::launchInDefaultBrowser() could launch all the common URL types :slight_smile:

Cheers :slight_smile:


#2

Yes, absolutely. Thanks for spotting that!


#3