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
This commit is contained in:
Cosimo Cecchi 2014-04-09 18:07:38 -07:00
parent 59d11879ef
commit 9fe9a676a4

View File

@ -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;
}