Skip to content

Commit

Permalink
Fix trailing slash case
Browse files Browse the repository at this point in the history
  • Loading branch information
Razz4780 committed Dec 2, 2024
1 parent a9840e8 commit e805a1e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion mirrord/layer/src/file/filter/read_local_by_default.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,10 @@ pub fn regex_set_builder() -> RegexSetBuilder {

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

RegexSetBuilder::new(patterns)
Expand Down

0 comments on commit e805a1e

Please sign in to comment.