Skip to content

Commit

Permalink
Added filter for hidden paths in HOME directory
Browse files Browse the repository at this point in the history
  • Loading branch information
Razz4780 committed Nov 29, 2024
1 parent a73fb72 commit ed9a820
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions changelog.d/+hidden-home-files-filter.changed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Hidden files and directories in `$HOME` directory are now read locally by default.
4 changes: 4 additions & 0 deletions mirrord/layer/src/file/filter/read_local_by_default.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,5 +92,9 @@ pub fn regex_set_builder() -> RegexSetBuilder {
patterns.push(format!("{}$", regex::escape(&executable.to_string_lossy())));
}

if let Ok(home) = env::var("HOME") {
patterns.push(format!("^{}/\\.", regex::escape(&home)))
}

RegexSetBuilder::new(patterns)
}

0 comments on commit ed9a820

Please sign in to comment.