[gnome-builder] app: ensure prgname is always set
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] app: ensure prgname is always set
- Date: Wed, 19 Jul 2017 03:37:47 +0000 (UTC)
commit 2f916350b7f2ccfb516794cf7c89f55661588e5c
Author: Christian Hergert <chergert redhat com>
Date: Mon Jul 10 16:29:41 2017 -0700
app: ensure prgname is always set
We can easily set a fallback which means we don't have to be
so careful going forward.
libide/application/ide-application-command-line.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/libide/application/ide-application-command-line.c
b/libide/application/ide-application-command-line.c
index d134e57..d0a57e4 100644
--- a/libide/application/ide-application-command-line.c
+++ b/libide/application/ide-application-command-line.c
@@ -252,6 +252,8 @@ ide_application_local_command_line (GApplication *application,
*exit_status = EXIT_SUCCESS;
prgname = g_get_prgname ();
+ if (prgname == NULL)
+ prgname = "gnome-builder";
/*
* Sometimes we can get a path like "/foo/bar/lt-test-foo"
@@ -263,7 +265,7 @@ ide_application_local_command_line (GApplication *application,
prgname = path_copy;
}
- if (prgname && g_str_has_prefix (prgname, "lt-"))
+ if (g_str_has_prefix (prgname, "lt-"))
prgname += strlen ("lt-");
if (g_str_equal (prgname, "gnome-builder-cli"))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]