From 7980eb7b82f716df9f2000075a002c186087983a Mon Sep 17 00:00:00 2001 From: Libby Date: Thu, 12 Nov 2026 22:19:09 +0000 Subject: [PATCH] cultcache-rs: the POSIX rename passes an absolute destination (FileName without RootDirectory must be a full path) Co-Authored-By: Claude Sonnet 5.5 --- packages/cultcache-rs/src/lib.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/cultcache-rs/src/lib.rs b/packages/cultcache-rs/src/lib.rs index 72beac66..89cb913c 100644 --- a/packages/cultcache-rs/src/lib.rs +++ b/packages/cultcache-rs/src/lib.rs @@ -4488,7 +4488,9 @@ impl ReplaceKernel for WindowsKernel { }; let staged_wide = wide(staged); - let destination_wide = wide(destination); + // FileName with a null RootDirectory must be a full path; MoveFileExW takes a relative one. + let destination_wide = + wide(&std::path::absolute(destination).unwrap_or_else(|_| destination.to_path_buf())); // FILE_RENAME_INFO ends in a variable-length name: allocate it as u64s for alignment. let name_bytes = (destination_wide.len() - 1) * 2; let header = std::mem::size_of::();