From 3c4fcfc3ed9861b65265d921d795988c9739ab00 Mon Sep 17 00:00:00 2001 From: Oleks Date: Mon, 16 Mar 2026 18:42:54 +0200 Subject: [PATCH] fix: also remove_dir_all in symlink_file for directory-type conflicts --- patches/rustc-symlink-file-eexist.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/patches/rustc-symlink-file-eexist.patch b/patches/rustc-symlink-file-eexist.patch index cdf3917..d6ac868 100644 --- a/patches/rustc-symlink-file-eexist.patch +++ b/patches/rustc-symlink-file-eexist.patch @@ -5,7 +5,7 @@ #[cfg(windows)] use std::os::windows::fs::symlink_file; - if !self.config.dry_run() { symlink_file(src.as_ref(), link.as_ref()) } else { Ok(()) } -+ if !self.config.dry_run() { let _ = std::fs::remove_file(link.as_ref()); symlink_file(src.as_ref(), link.as_ref()) } else { Ok(()) } ++ if !self.config.dry_run() { let _ = std::fs::remove_file(link.as_ref()); let _ = std::fs::remove_dir_all(link.as_ref()); symlink_file(src.as_ref(), link.as_ref()) } else { Ok(()) } } /// Returns if config.ninja is enabled, and checks for ninja existence,