Repository navigation
Implement unlinkat to support fs::remove_dir_all - #5414
programskillforverification wants to merge 2 commits into
Conversation
This comment has been minimized.
This comment has been minimized.
| interp_ok(()) | ||
| } | ||
|
|
||
| fn unlink(&mut self, path_op: &OpTy<'tcx>) -> InterpResult<'tcx, Scalar> { |
There was a problem hiding this comment.
It's probably best to share the code between unlink and unlinkat by adding parameters like
dirfd_op: Option<&OpTy<'tcx>>,
...
flags_op: Option<&OpTy<'tcx>>,There was a problem hiding this comment.
Ah wait this can also do rmdir... yeah then it's probably better to keep them separate.
| assert_eq!(libc::unlinkat(libc::AT_FDCWD, c"foo.txt".as_ptr(), 0), -1); | ||
| assert_eq!(Error::last_os_error().raw_os_error(), Some(libc::EACCES)); |
There was a problem hiding this comment.
Please use errno_result here instead. #5434 does that for the rest of this file.
357a2c3 to
e1efef3
Compare
|
@RalfJung |
|
There is |
My description is not accurate. Yes, the methods exist, so this is not blocked on missing API. The problem is a bug in them which make CI not pass: on Windows, |
Oh yeah that is pretty wrong indeed. |
|
☔ The latest upstream changes (possibly #5471) made this pull request unmergeable. Please resolve the merge conflicts. |
Fix #5408