[gnome-builder/wip/chergert/layout] app: ensure prgname is always set
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/chergert/layout] app: ensure prgname is always set
- Date: Mon, 10 Jul 2017 23:30:21 +0000 (UTC)
commit 7153a6fa0d9917ced7b4962ba8ecdaf84e20c63b
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]