Skip to content

Commit ea3fe53

Browse files
committed
std: sys: fs: uefi: Fix FileAttr size
- The underlying file size is represented by file_size field. The size field is just the size of structure since it is a C DST. Signed-off-by: Ayush Singh <[email protected]>
1 parent d2f8873 commit ea3fe53

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/std/src/sys/fs/uefi.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ impl FileAttr {
8181
unsafe {
8282
Self {
8383
attr: (*info.as_ptr()).attribute,
84-
size: (*info.as_ptr()).size,
84+
size: (*info.as_ptr()).file_size,
8585
modified: uefi_fs::uefi_to_systemtime((*info.as_ptr()).modification_time),
8686
accessed: uefi_fs::uefi_to_systemtime((*info.as_ptr()).last_access_time),
8787
created: uefi_fs::uefi_to_systemtime((*info.as_ptr()).create_time),

0 commit comments

Comments
 (0)