commit e8f3c734dab2958740b524b19f3c2d20206b6118 Author: Jasper St. Pierre Date: Tue Apr 30 01:52:46 2013 -0400 MenuEditor: Don't save after restoring default conditions diff --git a/Alacarte/MenuEditor.py b/Alacarte/MenuEditor.py index 4ed7172..e280ca3 100644 --- a/Alacarte/MenuEditor.py +++ b/Alacarte/MenuEditor.py @@ -58,14 +58,12 @@ class MenuEditor(object): def restoreToSystem(self): self.restoreTree(self.tree.get_root_directory()) - path = os.path.join(util.getUserMenuPath(), os.path.basename(self.tree.get_canonical_menu_path())) try: - os.unlink(path) + os.unlink(self.path) except OSError: pass self.loadDOM() - self.save() def restoreTree(self, menu): item_iter = menu.iter()