logic: implemented usage of FilePathFilters for excluded paths

* removed check in settings for existing paths of exclude filters
This commit is contained in:
mlangkabel
2018-03-12 08:51:38 +01:00
parent 31c9f9fecc
commit 6acfe0688f
44 changed files with 572 additions and 221 deletions
+9 -2
View File
@@ -85,9 +85,16 @@ void Settings::setVersion(size_t version)
FilePath Settings::expandPath(const FilePath& path)
{
std::vector<FilePath> paths = path.expandEnvironmentVariables();
if (paths.size() >= 1)
if (!paths.empty())
{
return paths[0];
if (paths.size() > 1)
{
LOG_WARNING(
L"Environment variable in path \"" + path.wstr() + L"\" has been expanded to " + std::to_wstring(paths.size()) +
L"paths, but only \"" + paths.front().wstr() + L"\" will be used."
);
}
return paths.front();
}
return FilePath();
}