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.

This commit is contained in:
Icius 2010-01-22 16:24:50 -05:00
parent 8392acfa8e
commit 8050294021

View File

@ -750,11 +750,12 @@ class pluginclass( object ):
os.system('gnome-desktop-item-edit ' + file_path) os.system('gnome-desktop-item-edit ' + file_path)
if filecmp.cmp(widget.desktopFile, file_path): if file_path != widget.desktopFile:
try: if filecmp.cmp(widget.desktopFile, file_path):
os.remove(file_path) try:
except os.error: os.remove(file_path)
pass except os.error:
pass
self.mintMenuWin.hide() self.mintMenuWin.hide()