diff options
author | Michael Larson <slioch@slioch.vyatta.com> | 2010-05-21 15:18:16 -0700 |
---|---|---|
committer | Michael Larson <slioch@slioch.vyatta.com> | 2010-05-21 15:18:16 -0700 |
commit | 4edb88158c62fa05c54b899898fad9c6b0a74959 (patch) | |
tree | 99065bbff8e8cc47c8b94ee2e558d2d1f199ff68 | |
parent | 145ee98b43adb97119bc0ac4a61993c078833635 (diff) | |
download | vyatta-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.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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++; } |