Skip to content

Commit

Permalink
Fix file mapping doesn't affect xstat (#2908)
Browse files Browse the repository at this point in the history
  • Loading branch information
aviramha authored Nov 7, 2024
1 parent 36e3cb4 commit 8131589
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions changelog.d/+remap-dont-affect.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix file mapping doesn't affect xstat
5 changes: 3 additions & 2 deletions mirrord/layer/src/file/ops.rs
Original file line number Diff line number Diff line change
Expand Up @@ -437,12 +437,13 @@ pub(crate) fn xstat(
let (path, fd) = match (rawish_path, fd) {
// fstatat
(Some(path), Some(fd)) => {
let path = path?;
let mut path = path?;
let fd = {
if fd == AT_FDCWD {
check_relative_paths!(path);

ensure_not_ignored!(remap_path!(path.clone()), false);
path = remap_path!(path);
ensure_not_ignored!(path, false);
None
} else {
Some(get_remote_fd(fd)?)
Expand Down

0 comments on commit 8131589

Please sign in to comment.