Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions src/config/loading/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,17 +69,15 @@ pub fn merge_path_lists(
/// Expand a list of paths (potentially containing glob patterns) into real
/// config paths, replacing it with the default paths when empty.
pub fn process_paths(config_paths: &[ConfigPath]) -> Option<Vec<ConfigPath>> {
let default_paths = default_config_paths();

let starting_paths = if !config_paths.is_empty() {
config_paths
config_paths.to_owned()
} else {
&default_paths
default_config_paths()
};

let mut paths = Vec::new();

for config_path in starting_paths {
for config_path in &starting_paths {
let config_pattern: &PathBuf = config_path.into();

let matches: Vec<PathBuf> = match glob(config_pattern.to_str().expect("No ability to glob"))
Expand Down