Skip to content

Commit

Permalink
also filter searched dirs
Browse files Browse the repository at this point in the history
  • Loading branch information
MnlPhlp committed Jan 24, 2024
1 parent 5e06a22 commit 885c4d4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "wspick"
version = "1.2.0"
version = "1.2.1"
authors = ["MnlPhlp <[email protected]>"]
edition = "2021"
license = "MIT OR Apache-2.0"
Expand Down
9 changes: 9 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,11 +161,20 @@ fn add_options_from_dirs(
paths.retain(|p| {
if let Ok(p) = p {
let name = p.file_name().to_string_lossy().to_string();
// filter custom project paths
for proj in config.paths.values() {
if proj.contains(&name) {
return false;
}
}
// filter searched dirs
if let Some(dirs) = &config.dirs {
for dir in dirs {
if dir.contains(&name) {
return false;
}
}
}
}
true
});
Expand Down

0 comments on commit 885c4d4

Please sign in to comment.