| ... | @@ -379,6 +379,9 @@ pub const File = struct { | ... | @@ -379,6 +379,9 @@ pub const File = struct { |
| 379 | const rc = windows.ntdll.NtQueryInformationFile(self.handle, &io_status_block, &info, @sizeOf(windows.FILE_ALL_INFORMATION), .FileAllInformation); | 379 | const rc = windows.ntdll.NtQueryInformationFile(self.handle, &io_status_block, &info, @sizeOf(windows.FILE_ALL_INFORMATION), .FileAllInformation); |
| 380 | switch (rc) { | 380 | switch (rc) { |
| 381 | .SUCCESS => {}, | 381 | .SUCCESS => {}, |
| | 382 | // Buffer overflow here indicates that there is more information available than was able to be stored in the buffer |
| | 383 | // size provided. This is treated as success because the type of variable-length information that this would be relevant for |
| | 384 | // (name, volume name, etc) we don't care about. |
| 382 | .BUFFER_OVERFLOW => {}, | 385 | .BUFFER_OVERFLOW => {}, |
| 383 | .INVALID_PARAMETER => unreachable, | 386 | .INVALID_PARAMETER => unreachable, |
| 384 | .ACCESS_DENIED => return error.AccessDenied, | 387 | .ACCESS_DENIED => return error.AccessDenied, |
| ... | @@ -830,6 +833,9 @@ pub const File = struct { | ... | @@ -830,6 +833,9 @@ pub const File = struct { |
| 830 | const rc = windows.ntdll.NtQueryInformationFile(self.handle, &io_status_block, &info, @sizeOf(windows.FILE_ALL_INFORMATION), .FileAllInformation); | 833 | const rc = windows.ntdll.NtQueryInformationFile(self.handle, &io_status_block, &info, @sizeOf(windows.FILE_ALL_INFORMATION), .FileAllInformation); |
| 831 | switch (rc) { | 834 | switch (rc) { |
| 832 | .SUCCESS => {}, | 835 | .SUCCESS => {}, |
| | 836 | // Buffer overflow here indicates that there is more information available than was able to be stored in the buffer |
| | 837 | // size provided. This is treated as success because the type of variable-length information that this would be relevant for |
| | 838 | // (name, volume name, etc) we don't care about. |
| 833 | .BUFFER_OVERFLOW => {}, | 839 | .BUFFER_OVERFLOW => {}, |
| 834 | .INVALID_PARAMETER => unreachable, | 840 | .INVALID_PARAMETER => unreachable, |
| 835 | .ACCESS_DENIED => return error.AccessDenied, | 841 | .ACCESS_DENIED => return error.AccessDenied, |