diff --git a/src/platform/redox/mod.rs b/src/platform/redox/mod.rs index 564566da98bec9b237e9dfd8b3d56008354edaff..09e1d6c3ab1d1290f18b3568da0308c0ddd10d88 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, }