summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAn-Cheng Huang <ancheng@vyatta.com>2011-03-31 17:55:39 -0700
committerAn-Cheng Huang <ancheng@vyatta.com>2011-03-31 17:55:39 -0700
commitdc07fe4c2b0df40589d4d63287953ee623711fb8 (patch)
tree0a0745c3ec5a4540d2c8ca7ca78c7ea7a112a6d0
parent256da050cc76dcfc123f2d303b48b5fb27ca5ad1 (diff)
downloadvyatta-cfg-dc07fe4c2b0df40589d4d63287953ee623711fb8.tar.gz
vyatta-cfg-dc07fe4c2b0df40589d4d63287953ee623711fb8.zip
fix for bug 6966
* fix paths issue in edit mode.
-rw-r--r--src/cstore/unionfs/cstore-unionfs.cpp2
-rw-r--r--src/cstore/unionfs/cstore-unionfs.hpp6
2 files changed, 6 insertions, 2 deletions
diff --git a/src/cstore/unionfs/cstore-unionfs.cpp b/src/cstore/unionfs/cstore-unionfs.cpp
index f926540..adf7868 100644
--- a/src/cstore/unionfs/cstore-unionfs.cpp
+++ b/src/cstore/unionfs/cstore-unionfs.cpp
@@ -210,6 +210,8 @@ UnionfsCstore::UnionfsCstore(bool use_edit_level)
tmpl_path /= tlvl;
}
}
+ orig_mutable_cfg_path = mutable_cfg_path;
+ orig_tmpl_path = tmpl_path;
_init_fs_escape_chars();
}
diff --git a/src/cstore/unionfs/cstore-unionfs.hpp b/src/cstore/unionfs/cstore-unionfs.hpp
index afb65a6..7c73225 100644
--- a/src/cstore/unionfs/cstore-unionfs.hpp
+++ b/src/cstore/unionfs/cstore-unionfs.hpp
@@ -91,6 +91,8 @@ private:
// path buffers
FsPath mutable_cfg_path; // mutable part of config path
FsPath tmpl_path; // whole template path
+ FsPath orig_mutable_cfg_path; // original mutable cfg path
+ FsPath orig_tmpl_path; // original template path
////// virtual functions defined in base class
// begin path modifiers
@@ -128,8 +130,8 @@ private:
}
};
void reset_paths() {
- tmpl_path = tmpl_root;
- mutable_cfg_path = "";
+ tmpl_path = orig_tmpl_path;
+ mutable_cfg_path = orig_mutable_cfg_path;
};
class UnionfsSavePaths : public SavePaths {