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:
parent
8392acfa8e
commit
8050294021
@ -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()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user