Allow using wildcards in config include paths
Updates `Config::tryExpandPath()` to return a vector of expanded path matches instead of a single path wrapped in an optional, with an empty vector indicating no matches. `Config::resolveConfigIncludes()` iterates over all of these matches, while other instances of path expansion (such as finding the base config path) retain their existing behavior and only use the first match.
This commit is contained in:
@ -20,8 +20,8 @@ class Config {
|
||||
static std::optional<std::string> findConfigPath(
|
||||
const std::vector<std::string> &names, const std::vector<std::string> &dirs = CONFIG_DIRS);
|
||||
|
||||
static std::optional<std::string> tryExpandPath(const std::string &base,
|
||||
const std::string &filename);
|
||||
static std::vector<std::string> tryExpandPath(const std::string &base,
|
||||
const std::string &filename);
|
||||
|
||||
Config() = default;
|
||||
|
||||
|
Reference in New Issue
Block a user