mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-23 18: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
7239416442
commit
c938e74231
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user