diff --git a/src/win/fs-event.c b/src/win/fs-event.c index 1954cb09..e1f79abd 100644 --- a/src/win/fs-event.c +++ b/src/win/fs-event.c @@ -339,7 +339,8 @@ void uv_process_fs_event_req(uv_loop_t* loop, uv_req_t* req, uv_fatal_error(ERROR_OUTOFMEMORY, "malloc"); } - _snwprintf(filenamew, size, L"%s\\%s", handle->dirw, + _snwprintf(filenamew, size, L"%s\\%.*s", handle->dirw, + file_info->FileNameLength / sizeof(WCHAR), file_info->FileName); filenamew[size - 1] = L'\0';