| 760 | } |
| 761 | |
| 762 | static bool windows_log_handle_valid(HANDLE file, LARGE_INTEGER *size_out) { |
| 763 | BY_HANDLE_FILE_INFORMATION info; |
| 764 | return file != INVALID_HANDLE_VALUE && GetFileType(file) == FILE_TYPE_DISK && |
| 765 | GetFileInformationByHandle(file, &info) != 0 && |
| 766 | (info.dwFileAttributes & (FILE_ATTRIBUTE_DIRECTORY | FILE_ATTRIBUTE_REPARSE_POINT)) == |
| 767 | 0 && |
| 768 | info.nNumberOfLinks == 1 && GetFileSizeEx(file, size_out) != 0 && |
| 769 | size_out->QuadPart >= 0; |
| 770 | } |
| 771 | |
| 772 | static HANDLE windows_log_open(const wchar_t *path, LARGE_INTEGER *size_out) { |
| 773 | /* windows_private_file_prepare creates or validates the file with IPC's |
no outgoing calls
no test coverage detected