appinfo: Don't try DBusActivatable with load_from_keyfile
authorRyan Lortie <desrt@desrt.ca>
Thu, 3 Oct 2013 14:02:08 +0000 (10:02 -0400)
committerRyan Lortie <desrt@desrt.ca>
Fri, 4 Oct 2013 16:19:03 +0000 (12:19 -0400)
We can't get the name of the filename, so we can't determine the application
ID.  We'll have to fallback on Exec= for this case.

https://bugzilla.gnome.org/show_bug.cgi?id=709326

gio/gdesktopappinfo.c

index f6f5bc0..141a89a 100644 (file)
@@ -461,7 +461,10 @@ g_desktop_app_info_load_from_keyfile (GDesktopAppInfo *info,
       info->path = NULL;
     }
 
-  if (bus_activatable)
+  /* Can only be DBusActivatable if we know the filename, which means
+   * that this won't work for the load-from-keyfile case.
+   */
+  if (bus_activatable && info->filename)
     {
       gchar *basename;
       gchar *last_dot;