about summary refs log tree commit diff
diff options
context:
space:
mode:
author许杰友 Jieyou Xu (Joe) <39484203+jieyouxu@users.noreply.github.com>2024-12-27 20:44:15 +0800
committerGitHub <noreply@github.com>2024-12-27 20:44:15 +0800
commit5544091054f6496b7e98258cc3725e3e7ef1fc26 (patch)
treefdd3e52925db058b40a492db8aab164136263170
parentf65dc4f3759222b7cb7c73dfd1542dc16750d082 (diff)
parent0af396f183b815be2b9905faee499c5cddf1c0b9 (diff)
Rollup merge of #134819 - ChrisDenton:trunc, r=Mark-Simulacrum
Fix mistake in windows file open

In #134722 this should have been `c::FileAllocationInfo` not `c::FileEndOfFileInfo`. Oops.
-rw-r--r--library/std/src/sys/pal/windows/fs.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/library/std/src/sys/pal/windows/fs.rs b/library/std/src/sys/pal/windows/fs.rs
index dda4259919b..553049099fc 100644
--- a/library/std/src/sys/pal/windows/fs.rs
+++ b/library/std/src/sys/pal/windows/fs.rs
@@ -323,7 +323,7 @@ impl File {
                     let alloc = c::FILE_ALLOCATION_INFO { AllocationSize: 0 };
                     let result = c::SetFileInformationByHandle(
                         handle.as_raw_handle(),
-                        c::FileEndOfFileInfo,
+                        c::FileAllocationInfo,
                         (&raw const alloc).cast::<c_void>(),
                         mem::size_of::<c::FILE_ALLOCATION_INFO>() as u32,
                     );