aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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