summaryrefslogtreecommitdiff
path: root/Mozo/MenuEditor.py
diff options
context:
space:
mode:
authorOlav Vitters <[email protected]>2011-08-22 20:55:06 +0200
committerAlexei Sorokin <[email protected]>2016-08-22 23:03:26 +0300
commit35c489c60bb9f7d608ad770c5902cf35d1ffb8df (patch)
tree4853e9a1f9e0e3d902d9e6fd7104e245b14733e9 /Mozo/MenuEditor.py
parentd28f7585e8ae6e9931714b3029b92c6a3f87c745 (diff)
downloadmozo-35c489c60bb9f7d608ad770c5902cf35d1ffb8df.tar.bz2
mozo-35c489c60bb9f7d608ad770c5902cf35d1ffb8df.tar.xz
don't crash when a desktop has a / in the name
reported by Andreas Moog https://bugzilla.gnome.org/show_bug.cgi?id=576531
Diffstat (limited to 'Mozo/MenuEditor.py')
-rw-r--r--Mozo/MenuEditor.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Mozo/MenuEditor.py b/Mozo/MenuEditor.py
index 66e4d74..af7ee4f 100644
--- a/Mozo/MenuEditor.py
+++ b/Mozo/MenuEditor.py
@@ -289,7 +289,7 @@ class MenuEditor:
#erase Categories in new file
keyfile.set('Categories', ('',))
keyfile.set('Hidden', False)
- file_id = util.getUniqueFileId(item.get_name(), '.desktop')
+ file_id = util.getUniqueFileId(item.get_name().replace(os.sep, '-'), '.desktop')
out_path = os.path.join(util.getUserItemPath(), file_id)
keyfile.write(open(out_path, 'w'))
self.__addItem(new_parent, file_id, dom)