From e384055689c962201c32e19eb0f3808419ae92c5 Mon Sep 17 00:00:00 2001 From: Steven Luo Date: Sun, 30 May 2010 01:54:25 -0700 Subject: [PATCH] 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. --- launcher.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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" */ -- 1.7.9.5