mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-03-03 22:52:09 +01:00
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:
parent
59d11879ef
commit
9fe9a676a4
@ -238,8 +238,12 @@ app_path_for_id (const gchar *app_id)
|
|||||||
|
|
||||||
path = g_strconcat ("/", app_id, NULL);
|
path = g_strconcat ("/", app_id, NULL);
|
||||||
for (i = 0; path[i]; i++)
|
for (i = 0; path[i]; i++)
|
||||||
|
{
|
||||||
if (path[i] == '.')
|
if (path[i] == '.')
|
||||||
path[i] = '/';
|
path[i] = '/';
|
||||||
|
if (path[i] == '-')
|
||||||
|
path[i] = '_';
|
||||||
|
}
|
||||||
|
|
||||||
return path;
|
return path;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user