[alacarte] Don't crash when a desktop has a / in the name
- From: Olav Vitters <ovitters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [alacarte] Don't crash when a desktop has a / in the name
- Date: Mon, 22 Aug 2011 19:01:50 +0000 (UTC)
commit 49cf1a25227018de4878eee5ca4440c1cc0a3fac
Author: Olav Vitters <olav vitters nl>
Date: Mon Aug 22 20:55:06 2011 +0200
Don't crash when a desktop has a / in the name
Reported by Andreas Moog
https://bugzilla.gnome.org/show_bug.cgi?id=576531
Alacarte/MenuEditor.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/Alacarte/MenuEditor.py b/Alacarte/MenuEditor.py
index fafd87e..1cd84ed 100644
--- a/Alacarte/MenuEditor.py
+++ b/Alacarte/MenuEditor.py
@@ -276,7 +276,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)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]