config: getDaemSkippedPaths() could crash if daemSkippedPaths was empty
This commit is contained in:
parent
8866431f41
commit
e9d2719247
1 changed files with 8 additions and 3 deletions
|
@ -969,12 +969,17 @@ vector<string> RclConfig::getDaemSkippedPaths()
|
||||||
*it = path_tildexpand(*it);
|
*it = path_tildexpand(*it);
|
||||||
*it = path_canon(*it);
|
*it = path_canon(*it);
|
||||||
}
|
}
|
||||||
sort(dskpl.begin(), dskpl.end());
|
|
||||||
|
|
||||||
vector<string> skpl1 = getSkippedPaths();
|
vector<string> skpl1 = getSkippedPaths();
|
||||||
vector<string> skpl;
|
vector<string> skpl;
|
||||||
merge(dskpl.begin(), dskpl.end(), skpl1.begin(), skpl1.end(), skpl.begin());
|
if (dskpl.empty()) {
|
||||||
unique(skpl.begin(), skpl.end());
|
skpl = skpl1;
|
||||||
|
} else {
|
||||||
|
sort(dskpl.begin(), dskpl.end());
|
||||||
|
merge(dskpl.begin(), dskpl.end(), skpl1.begin(), skpl1.end(),
|
||||||
|
skpl.begin());
|
||||||
|
unique(skpl.begin(), skpl.end());
|
||||||
|
}
|
||||||
return skpl;
|
return skpl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue