Skip to content

Commit 9bbd963

Browse files
committed
clean: update for nix 0.30
1 parent 3ebc210 commit 9bbd963

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/clean.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,16 @@ impl interface::CleanMode {
122122
continue;
123123
};
124124

125+
// Create a file descriptor for the current working directory
126+
let dirfd = nix::fcntl::open(
127+
".",
128+
nix::fcntl::OFlag::O_DIRECTORY,
129+
nix::sys::stat::Mode::empty(),
130+
)?;
131+
125132
// Use .exists to not travel symlinks
126133
if match faccessat(
127-
None,
134+
&dirfd,
128135
&dst,
129136
AccessFlags::F_OK | AccessFlags::W_OK,
130137
AtFlags::AT_SYMLINK_NOFOLLOW,

0 commit comments

Comments
 (0)