Преглед изворни кода

Rename can be done with O_PATH

Jeremy Soller пре 6 година
родитељ
комит
588f032f75
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      src/platform/redox/mod.rs

+ 1 - 1
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,
         }