diff --git a/src/win/fs.c b/src/win/fs.c index 3c886dcb..d69964a1 100644 --- a/src/win/fs.c +++ b/src/win/fs.c @@ -726,7 +726,7 @@ void fs__readdir(uv_fs_t* req) { #ifdef _MSC_VER swprintf(path2, len + 3, fmt, pathw); #else - swprintf(path2, fmt, path); + swprintf(path2, fmt, pathw); #endif dir = FindFirstFileW(path2, &ent); free(path2); diff --git a/src/win/winapi.h b/src/win/winapi.h index 0bf178ee..1bf6304b 100644 --- a/src/win/winapi.h +++ b/src/win/winapi.h @@ -4379,6 +4379,11 @@ typedef NTSTATUS (NTAPI *sNtQuerySystemInformation) # define ENABLE_EXTENDED_FLAGS 0x80 #endif +/* from winerror.h */ +#ifndef ERROR_SYMLINK_NOT_SUPPORTED +# define ERROR_SYMLINK_NOT_SUPPORTED 1464 +#endif + typedef BOOL (WINAPI *sGetQueuedCompletionStatusEx) (HANDLE CompletionPort, LPOVERLAPPED_ENTRY lpCompletionPortEntries,