From 588f032f75fefde4cb51970ad9d5e178ee8fa47e Mon Sep 17 00:00:00 2001 From: Jeremy Soller <jeremy@system76.com> Date: Sat, 6 Apr 2019 20:47:20 -0600 Subject: [PATCH] Rename can be done with O_PATH --- src/platform/redox/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/platform/redox/mod.rs b/src/platform/redox/mod.rs index 564566da..09e1d6c3 100644 --- a/src/platform/redox/mod.rs +++ b/src/platform/redox/mod.rs @@ -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, } -- GitLab