Fixed minor issue on windows.

This commit is contained in:
Adam 2022-06-23 17:43:49 -04:00
parent 1e91080680
commit d48fa9ef74
1 changed files with 1 additions and 1 deletions

View File

@ -42,7 +42,7 @@ int translate_changes_dirmonitor(struct dirmonitor_internal* monitor, char* buff
for (FILE_NOTIFY_INFORMATION* info = (FILE_NOTIFY_INFORMATION*)buffer; (char*)info < buffer + buffer_size; info = (FILE_NOTIFY_INFORMATION*)(((char*)info) + info->NextEntryOffset)) {
char transform_buffer[PATH_MAX*4];
int count = WideCharToMultiByte(CP_UTF8, 0, (WCHAR*)info->FileName, info->FileNameLength, transform_buffer, PATH_MAX*4 - 1, NULL, NULL);
change_callback(count, buffer, data);
change_callback(count, transform_buffer, data);
if (!info->NextEntryOffset)
break;
}