summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Larson <slioch@slioch.vyatta.com>2010-05-21 15:18:16 -0700
committerMichael Larson <slioch@slioch.vyatta.com>2010-05-21 15:18:16 -0700
commit4edb88158c62fa05c54b899898fad9c6b0a74959 (patch)
tree99065bbff8e8cc47c8b94ee2e558d2d1f199ff68
parent145ee98b43adb97119bc0ac4a61993c078833635 (diff)
downloadvyatta-cfg-4edb88158c62fa05c54b899898fad9c6b0a74959.tar.gz
vyatta-cfg-4edb88158c62fa05c54b899898fad9c6b0a74959.zip
don't count current node towards limit if it already matches a node in the configuration.
-rw-r--r--src/set.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/set.c b/src/set.c
index 08db114..42e84ec 100644
--- a/src/set.c
+++ b/src/set.c
@@ -120,7 +120,8 @@ boolean set_validate(vtw_def *defp, char *valp, boolean empty_val)
if (dirp != NULL) {
while ((entry = readdir(dirp)) != NULL) {
if (strcmp(entry->d_name,".") != 0 &&
- strcmp(entry->d_name,"..") != 0) {
+ strcmp(entry->d_name,"..") != 0 &&
+ strcmp(val,entry->d_name) != 0) {
strcpy(last_val,entry->d_name);
file_count++;
}