fix: windows build (#11465)

This commit is contained in:
Matthias Seitz
2024-10-03 18:26:45 +02:00
committed by GitHub
parent 6c16df2365
commit d72e438c06

View File

@ -307,6 +307,9 @@ where
F: FnOnce(&mut File) -> std::result::Result<(), E>, F: FnOnce(&mut File) -> std::result::Result<(), E>,
E: Into<Box<dyn core::error::Error + Send + Sync>>, E: Into<Box<dyn core::error::Error + Send + Sync>>,
{ {
#[cfg(windows)]
use std::os::windows::fs::OpenOptionsExt;
let mut tmp_path = file_path.to_path_buf(); let mut tmp_path = file_path.to_path_buf();
tmp_path.set_extension("tmp"); tmp_path.set_extension("tmp");