libutil: implement PathsSetting<PathSet>
By implementing the `PathSet` specialization for `PathsSetting`, we'll
be able to use `PathsSetting` for the `sandboxPaths` setting in
`src/libstore/globals.hh`.
Fixes: #498
Change-Id: I8bf7dfff98609d1774fdb36d63e57d787bcc829f
This commit is contained in:
parent
f6077314fa
commit
5a06b17b91
|
@ -474,9 +474,22 @@ template<> Paths PathsSetting<Paths>::parse(const std::string & str, const Apply
|
||||||
return parsed;
|
return parsed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template<> PathSet PathsSetting<PathSet>::parse(const std::string &str, const ApplyConfigOptions & options) const
|
||||||
|
{
|
||||||
|
auto strings = tokenizeString<Strings>(str);
|
||||||
|
PathSet parsed;
|
||||||
|
|
||||||
|
for (auto str : strings) {
|
||||||
|
parsed.insert(parsePath(*this, str, options));
|
||||||
|
}
|
||||||
|
|
||||||
|
return parsed;
|
||||||
|
}
|
||||||
|
|
||||||
template class PathsSetting<Path>;
|
template class PathsSetting<Path>;
|
||||||
template class PathsSetting<std::optional<Path>>;
|
template class PathsSetting<std::optional<Path>>;
|
||||||
template class PathsSetting<Paths>;
|
template class PathsSetting<Paths>;
|
||||||
|
template class PathsSetting<PathSet>;
|
||||||
|
|
||||||
|
|
||||||
bool GlobalConfig::set(const std::string & name, const std::string & value, const ApplyConfigOptions & options)
|
bool GlobalConfig::set(const std::string & name, const std::string & value, const ApplyConfigOptions & options)
|
||||||
|
|
Loading…
Reference in a new issue