diff --git a/lib/roles/http/server/server.c b/lib/roles/http/server/server.c index 49ff31fec..af426aa18 100644 --- a/lib/roles/http/server/server.c +++ b/lib/roles/http/server/server.c @@ -720,9 +720,13 @@ lws_http_serve(struct lws *wsi, char *uri, const char *origin, } #else #if defined(LWS_HAVE__STAT32I64) - if (_stat32i64(path, &st)) { - lwsl_info("unable to stat %s\n", path); - goto notfound; + { + WCHAR buf[MAX_PATH]; + MultiByteToWideChar(CP_UTF8, 0, path, -1, buf, LWS_ARRAY_SIZE(buf)); + if (_wstat32i64(buf, &st)) { + lwsl_info("unable to stat %s\n", path); + goto notfound; + } } #else if (stat(path, &st)) {