summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAn-Cheng Huang <ancheng@vyatta.com>2011-05-18 18:26:37 -0700
committerAn-Cheng Huang <ancheng@vyatta.com>2011-05-18 18:26:37 -0700
commit119cf0cf78b81866436a6f3eb44ebdf582d72c32 (patch)
treea1d1772107bc366bca9829f38bcfd230c7aa93f4 /src
parent1f8b8f1fd124b6c9adb3c4523d7d2269d8f0dded (diff)
downloadvyatta-cfg-119cf0cf78b81866436a6f3eb44ebdf582d72c32.tar.gz
vyatta-cfg-119cf0cf78b81866436a6f3eb44ebdf582d72c32.zip
correct comment file handling in copy and minor cleanup.
Diffstat (limited to 'src')
-rw-r--r--src/commit/commit-algorithm.cpp6
-rw-r--r--src/cstore/unionfs/cstore-unionfs.cpp6
2 files changed, 8 insertions, 4 deletions
diff --git a/src/commit/commit-algorithm.cpp b/src/commit/commit-algorithm.cpp
index 46cfa58..580c9dc 100644
--- a/src/commit/commit-algorithm.cpp
+++ b/src/commit/commit-algorithm.cpp
@@ -1172,8 +1172,10 @@ commit::doCommit(Cstore& cs, CfgNode& cfg1, CfgNode& cfg2)
Cpath p;
CfgNode *root = getCommitTree(&cfg1, &cfg2, p);
if (!root) {
- OUTPUT_USER("No configuration changes to commit\n");
- /* call the low-level commitConfig() function with a dummy structure
+ /* "session changed" check has already been performed before commit
+ * execution, so no need to repeat it here.
+ *
+ * call the low-level commitConfig() function with a dummy structure
* representing successful commit on the whole tree. this is equivalent
* to copying the whole working config back to the active config. since
* the two are "logically" the same, this is redundant in most cases.
diff --git a/src/cstore/unionfs/cstore-unionfs.cpp b/src/cstore/unionfs/cstore-unionfs.cpp
index 41ce008..04e9975 100644
--- a/src/cstore/unionfs/cstore-unionfs.cpp
+++ b/src/cstore/unionfs/cstore-unionfs.cpp
@@ -1428,8 +1428,10 @@ UnionfsCstore::recursive_copy_dir(const FsPath& src, const FsPath& dst,
if (filter_dot_entries) {
string of = di->path().filename();
if (!of.empty() && of.at(0) == '.') {
- // filter dot files
- continue;
+ // filter dot files (with exceptions)
+ if (of != C_COMMENT_FILE) {
+ continue;
+ }
}
}
b_fs::copy_file(di->path(), nname);