Commit 2138d5d9 authored by Ray Strode's avatar Ray Strode

main: support GNOME_SESSION_DEBUG=0 and GNOME_SESSION_DEBUG=1

rpmatch curiously doesn't grok 0 and 1 as no and yes.  This commit
throws atoi into the mix to cover those cases.
parent c3c3f2b9
......@@ -233,6 +233,7 @@ main (int argc, char **argv)
GError *error = NULL;
static char **override_autostart_dirs = NULL;
static char *opt_session_name = NULL;
const char *debug_string = NULL;
gboolean gl_failed = FALSE;
guint name_owner_id;
GOptionContext *options;
......@@ -257,8 +258,9 @@ main (int argc, char **argv)
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
textdomain (GETTEXT_PACKAGE);
if (g_getenv ("GNOME_SESSION_DEBUG") != NULL) {
debug = rpmatch (g_getenv ("GNOME_SESSION_DEBUG"));
debug_string = g_getenv ("GNOME_SESSION_DEBUG");
if (debug_string != NULL) {
debug = rpmatch (debug_string) == TRUE || atoi (debug_string) == 1;
}
error = NULL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment