Skip to content

Commit 5544091

Browse files
authored
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.
2 parents f65dc4f + 0af396f commit 5544091

File tree

1 file changed

+1
-1
lines changed
  • library/std/src/sys/pal/windows

1 file changed

+1
-1
lines changed

library/std/src/sys/pal/windows/fs.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ impl File {
323323
let alloc = c::FILE_ALLOCATION_INFO { AllocationSize: 0 };
324324
let result = c::SetFileInformationByHandle(
325325
handle.as_raw_handle(),
326-
c::FileEndOfFileInfo,
326+
c::FileAllocationInfo,
327327
(&raw const alloc).cast::<c_void>(),
328328
mem::size_of::<c::FILE_ALLOCATION_INFO>() as u32,
329329
);

0 commit comments

Comments
 (0)