aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Harvey <chris@basementcode.com>2010-06-01 19:00:05 -0400
committerChristopher Harvey <chris@basementcode.com>2010-06-01 19:00:05 -0400
commit8b090295442b6501b9857a6d00f8db31c34b7fc3 (patch)
tree580e833e1c5906f22029273b0081eefe96f0cf62
parentStarted inittab module. (diff)
downloadventoo-8b090295442b6501b9857a6d00f8db31c34b7fc3.tar.gz
ventoo-8b090295442b6501b9857a6d00f8db31c34b7fc3.tar.bz2
ventoo-8b090295442b6501b9857a6d00f8db31c34b7fc3.zip
Fixed a bug removing elements while working in /
-rw-r--r--src/frontend/main.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/frontend/main.py b/src/frontend/main.py
index 71e2340..9c7be75 100644
--- a/src/frontend/main.py
+++ b/src/frontend/main.py
@@ -87,7 +87,10 @@ class MainWindow(gtk.Window):
thisIter = model.get_iter_from_string(path)
enabled = model.get_value(thisIter, 0)
aug_root = a.get("/augeas/root")
- augPath = osp.join('files', osp.relpath(self.currentConfigFilePath, aug_root), self.edit_tv.get_label_path(thisIter))
+ if not aug_root == '/':
+ augPath = osp.join('files', osp.relpath(self.currentConfigFilePath, aug_root), self.edit_tv.get_label_path(thisIter))
+ else:
+ augPath = osp.join('files', augeas_utils.stripBothSlashes(self.currentConfigFilePath), self.edit_tv.get_label_path(thisIter))
if enabled: #this row was just added, update augeas tree.
indexes = path.split(':')
beforeIndex = int(indexes[len(indexes)-1])-1