Skip to content

Commit

Permalink
Filesystem: File not found default filter happens after checking loca…
Browse files Browse the repository at this point in the history
…l filter (metalbear-co#2159)
  • Loading branch information
aviramha authored Jan 9, 2024
1 parent 5804f38 commit d6ddd5c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelog.d/+change-not-found-order-filter.changed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Filesystem: File not found default filter happens after checking local filter
2 changes: 1 addition & 1 deletion mirrord/layer/src/file/filter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,8 @@ impl FileFilter {
Detour::Success(())
}
}
_ if self.default_not_found.is_match(text) => Detour::Error(HookError::FileNotFound),
_ if self.local.is_match(text) => Detour::Bypass(op()),
_ if self.default_not_found.is_match(text) => Detour::Error(HookError::FileNotFound),
_ if self.default_remote_ro.is_match(text) && !write => Detour::Success(()),
_ if self.default_local.is_match(text) => Detour::Bypass(op()),
FsModeConfig::LocalWithOverrides => Detour::Bypass(op()),
Expand Down

0 comments on commit d6ddd5c

Please sign in to comment.