[gnome-packagekit/gnome-2-28] bugfix: if command line contains (deleted) the original binary is invalid, and don't show it in the



commit 6b0a7620a9a767b4d5288a6c1be5076d137af7bc
Author: Richard Hughes <richard hughsie com>
Date:   Wed Sep 23 10:03:10 2009 +0100

    bugfix: if command line contains (deleted) the original binary is invalid, and don't show it in the UI. Fixes rh#524873

 src/gpk-dbus.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/gpk-dbus.c b/src/gpk-dbus.c
index b1f3130..f35e4c4 100644
--- a/src/gpk-dbus.c
+++ b/src/gpk-dbus.c
@@ -211,6 +211,13 @@ gpk_dbus_get_exec_for_sender (GpkDbus *dbus, const gchar *sender)
 		egg_warning ("failed to get cmdline: %s", error->message);
 		g_error_free (error);
 	}
+
+	/* if command line contains (deleted) the original binary is invalid */
+	if (g_strstr_len (cmdline, "(deleted)") != NULL) {
+		g_free (cmdline);
+		cmdline = NULL;
+		goto out;
+	}
 out:
 	g_free (filename);
 	return cmdline;



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