summaryrefslogtreecommitdiff
path: root/bus/activation.c
diff options
context:
space:
mode:
authorFridrich Štrba <fridrich.strba@bluewin.ch>2010-04-21 10:42:06 +0200
committerRalf Habacker <ralf.habacker@freenet.de>2010-04-21 12:30:52 +0200
commited79e030ca4a3d87803b5f4789941fd63fb84444 (patch)
tree786579d635be63fb3631fe0bed3c2177071db514 /bus/activation.c
parent14cc116254abfb7e49069f143322f2869eea5a83 (diff)
downloaddbus-ed79e030ca4a3d87803b5f4789941fd63fb84444.tar.gz
Patch relocating "exec" variable and position of service files
Diffstat (limited to 'bus/activation.c')
-rw-r--r--bus/activation.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/bus/activation.c b/bus/activation.c
index 54296c1d..9d454c76 100644
--- a/bus/activation.c
+++ b/bus/activation.c
@@ -255,7 +255,7 @@ update_desktop_file_entry (BusActivation *activation,
BusDesktopFile *desktop_file,
DBusError *error)
{
- char *name, *exec, *user;
+ char *name, *exec, *user, *exec_tmp;
BusActivationEntry *entry;
DBusStat stat_buf;
DBusString file_path;
@@ -266,6 +266,7 @@ update_desktop_file_entry (BusActivation *activation,
name = NULL;
exec = NULL;
user = NULL;
+ exec_tmp = NULL;
entry = NULL;
dbus_error_init (&tmp_error);
@@ -300,7 +301,7 @@ update_desktop_file_entry (BusActivation *activation,
if (!bus_desktop_file_get_string (desktop_file,
DBUS_SERVICE_SECTION,
DBUS_SERVICE_EXEC,
- &exec,
+ &exec_tmp,
error))
goto failed;
@@ -329,6 +330,9 @@ update_desktop_file_entry (BusActivation *activation,
entry = _dbus_hash_table_lookup_string (s_dir->entries,
_dbus_string_get_const_data (filename));
+
+ exec = strdup (_dbus_replace_install_prefix (exec_tmp));
+
if (entry == NULL) /* New file */
{
/* FIXME we need a better-defined algorithm for which service file to
@@ -417,7 +421,7 @@ update_desktop_file_entry (BusActivation *activation,
failed:
dbus_free (name);
- dbus_free (exec);
+ dbus_free (exec_tmp);
dbus_free (user);
_dbus_string_free (&file_path);