config checking: only test skippedPaths existence for user-added values, not defaults

This commit is contained in:
Jean-Francois Dockes
2015-06-08 13:20:06 +02:00
parent 4989d1f991
commit c7f5318e43
4 changed files with 31 additions and 17 deletions
+4 -2
View File
@@ -284,7 +284,9 @@ static bool checktopdirs(RclConfig *config, vector<string>& nonexist)
}
}
if (config->getConfParam("skippedPaths", &tdl)) {
// Check skippedPaths too, but only the user part (shallow==true), not
// the default values (e.g. /media, which might not exist).
if (config->getConfParam("skippedPaths", &tdl, true)) {
for (vector<string>::iterator it = tdl.begin(); it != tdl.end(); it++) {
*it = path_tildexpand(*it);
if (access(it->c_str(), 0) < 0) {
@@ -293,7 +295,7 @@ static bool checktopdirs(RclConfig *config, vector<string>& nonexist)
}
}
if (config->getConfParam("daemSkippedPaths", &tdl)) {
if (config->getConfParam("daemSkippedPaths", &tdl, true)) {
for (vector<string>::iterator it = tdl.begin(); it != tdl.end(); it++) {
*it = path_tildexpand(*it);
if (access(it->c_str(), 0) < 0) {