From 805029402181987165814a6d9111758e6aec8e58 Mon Sep 17 00:00:00 2001 From: Icius Date: Fri, 22 Jan 2010 16:24:50 -0500 Subject: [PATCH] Added a condition around the local file removal logic to only do it if the .desktop file exists somewhere other than the user's local directory structure. --- usr/lib/linuxmint/mintMenu/plugins/applications.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/usr/lib/linuxmint/mintMenu/plugins/applications.py b/usr/lib/linuxmint/mintMenu/plugins/applications.py index 8c7359b..8499ef0 100755 --- a/usr/lib/linuxmint/mintMenu/plugins/applications.py +++ b/usr/lib/linuxmint/mintMenu/plugins/applications.py @@ -750,11 +750,12 @@ class pluginclass( object ): os.system('gnome-desktop-item-edit ' + file_path) - if filecmp.cmp(widget.desktopFile, file_path): - try: - os.remove(file_path) - except os.error: - pass + if file_path != widget.desktopFile: + if filecmp.cmp(widget.desktopFile, file_path): + try: + os.remove(file_path) + except os.error: + pass self.mintMenuWin.hide()