From 19de9787996f5f364d1bf6599248be7cf26485d7 Mon Sep 17 00:00:00 2001 From: James Matlik Date: Wed, 11 Jun 2025 23:37:46 -0400 Subject: [PATCH] Fix issue with rename to relative destination --- src/platform/redox/mod.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/platform/redox/mod.rs b/src/platform/redox/mod.rs index de4d2000bf..e176d5bd15 100644 --- a/src/platform/redox/mod.rs +++ b/src/platform/redox/mod.rs @@ -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)?;