[glib] GApplication: allow '-' in application ID



commit f44cd4129356dd569fd90e3ea83e386bce0602a7
Author: Ryan Lortie <desrt desrt ca>
Date:   Wed Jun 8 22:21:15 2011 -0400

    GApplication: allow '-' in application ID
    
    By converting it to _ before trying to shove it into an object path.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=652025

 gio/gapplicationimpl-dbus.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/gio/gapplicationimpl-dbus.c b/gio/gapplicationimpl-dbus.c
index fb6cf2b..7be5627 100644
--- a/gio/gapplicationimpl-dbus.c
+++ b/gio/gapplicationimpl-dbus.c
@@ -391,6 +391,9 @@ application_path_from_appid (const gchar *appid)
     {
       if (*iter == '.')
         *iter = '/';
+
+      if (*iter == '-')
+        *iter = '_';
     }
 
   return appid_path;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]