Merge branch 'Fix-relative-path-mv' into 'master'

Fix issue with rename to relative destination

See merge request redox-os/relibc!659
This commit is contained in:
Jeremy Soller
2025-06-12 10:58:26 -06:00
+1
View File
@@ -855,6 +855,7 @@ impl Pal for Sys {
fn rename(oldpath: CStr, newpath: CStr) -> Result<()> {
let newpath = newpath.to_str().map_err(|_| Errno(EINVAL))?;
let newpath = canonicalize(newpath).map_err(|_| Errno(EINVAL))?;
let file = File::open(oldpath, fcntl::O_PATH | fcntl::O_CLOEXEC)?;
syscall::frename(*file as usize, newpath)?;