From 9fe9a676a452a73daccdb46246575c4a4c97ee16 Mon Sep 17 00:00:00 2001 From: Cosimo Cecchi Date: Wed, 9 Apr 2014 18:07:38 -0700 Subject: [PATCH] gapplication-tool: ensure object paths are valid Hyphens are not valid characters for DBus object paths; see the similar code in gapplicationimpl-dbus.c https://bugzilla.gnome.org/show_bug.cgi?id=727928 --- gio/gapplication-tool.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/gio/gapplication-tool.c b/gio/gapplication-tool.c index fb5678c..9f6f8d1 100644 --- a/gio/gapplication-tool.c +++ b/gio/gapplication-tool.c @@ -238,8 +238,12 @@ app_path_for_id (const gchar *app_id) path = g_strconcat ("/", app_id, NULL); for (i = 0; path[i]; i++) - if (path[i] == '.') - path[i] = '/'; + { + if (path[i] == '.') + path[i] = '/'; + if (path[i] == '-') + path[i] = '_'; + } return path; } -- 2.7.4