summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAn-Cheng Huang <ancheng@vyatta.com>2010-11-18 09:35:07 -0800
committerAn-Cheng Huang <ancheng@vyatta.com>2010-11-18 09:35:07 -0800
commit5a03e97e8b54d6cbfa4ea4a6ebef20126df9290a (patch)
treef3a380c5f07d66058934aaa553583b038cb4de43
parentade6aa5934ce77fd68a890f624d9e210bce40e77 (diff)
downloadvyatta-cfg-5a03e97e8b54d6cbfa4ea4a6ebef20126df9290a.tar.gz
vyatta-cfg-5a03e97e8b54d6cbfa4ea4a6ebef20126df9290a.zip
change error message when showing non-existing paths.
-rw-r--r--src/cnode/cnode-algorithm.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cnode/cnode-algorithm.cpp b/src/cnode/cnode-algorithm.cpp
index c5a2d54..405ab4f 100644
--- a/src/cnode/cnode-algorithm.cpp
+++ b/src/cnode/cnode-algorithm.cpp
@@ -379,7 +379,8 @@ cnode::show_diff(const CfgNode& cfg1, const CfgNode& cfg2, bool show_def,
printf("Specified configuration path is not valid\n");
return;
}
- if (cfg1.isEmpty() && cfg2.isEmpty()) {
+ if ((cfg1.isEmpty() && cfg2.isEmpty())
+ || (!cfg1.exists() && !cfg2.exists())) {
printf("Configuration under specified path is empty\n");
return;
}