Skip to content

Commit

Permalink
Added local filter for hidden paths inside 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 a9840e8
Show file tree
Hide file tree
Showing 2 changed files with 6 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.
5 changes: 5 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,10 @@ pub fn regex_set_builder() -> RegexSetBuilder {
patterns.push(format!("{}$", regex::escape(&executable.to_string_lossy())));
}

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

RegexSetBuilder::new(patterns)
}

0 comments on commit a9840e8

Please sign in to comment.