From d72e438c06e040e213b5decf5f29543c86cbad0f Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Thu, 3 Oct 2024 18:26:45 +0200 Subject: [PATCH] fix: windows build (#11465) --- crates/fs-util/src/lib.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crates/fs-util/src/lib.rs b/crates/fs-util/src/lib.rs index 0cfcf04539bd..d242ecc98e2d 100644 --- a/crates/fs-util/src/lib.rs +++ b/crates/fs-util/src/lib.rs @@ -307,6 +307,9 @@ where F: FnOnce(&mut File) -> std::result::Result<(), E>, E: Into>, { + #[cfg(windows)] + use std::os::windows::fs::OpenOptionsExt; + let mut tmp_path = file_path.to_path_buf(); tmp_path.set_extension("tmp");