From: Steven Luo Date: Sun, 30 May 2010 08:54:25 +0000 (-0700) Subject: Fix check for whether a browser is installed X-Git-Tag: v3.3b1~2 X-Git-Url: http://git.maemo.org/git/?p=browser-switch;a=commitdiff_plain;h=e384055689c962201c32e19eb0f3808419ae92c5;ds=sidebyside Fix check for whether a browser is installed The intent was to exempt MicroB (and any other browser listed with browser->binary = NULL) from the check, but the tests here didn't do that. Fix this so that default_browser = microb doesn't emit a warning. --- diff --git a/launcher.c b/launcher.c index 935db63..fe57eb9 100644 --- a/launcher.c +++ b/launcher.c @@ -656,12 +656,13 @@ void update_default_browser(struct swb_context *ctx, char *default_browser) { if (!strcmp(default_browser, browser->name)) { /* Make sure the user's choice is installed on the system */ - if (browser->binary && !access(browser->binary, X_OK)) { - use_launcher_as_default(ctx, browser); - return; - } else + if (browser->binary && access(browser->binary, X_OK)) { log_msg("%s appears not to be installed\n", default_browser); + } else { + use_launcher_as_default(ctx, browser); + return; + } } /* Deal with default_browser = "other" */