Skip to content
Snippets Groups Projects
Verified Commit 588f032f authored by Jeremy Soller's avatar Jeremy Soller
Browse files

Rename can be done with O_PATH

parent 54b6c8f0
No related branches found
No related tags found
No related merge requests found
......@@ -889,7 +889,7 @@ impl Pal for Sys {
}
fn rename(oldpath: &CStr, newpath: &CStr) -> c_int {
match File::open(oldpath, fcntl::O_WRONLY | fcntl::O_CLOEXEC) {
match File::open(oldpath, fcntl::O_PATH | fcntl::O_CLOEXEC) {
Ok(file) => e(syscall::frename(*file as usize, newpath.to_bytes())) as c_int,
Err(_) => -1,
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment