win32 lstat: if it's not a link, just do stat

This commit is contained in:
Hisham Muhammad
2020-04-21 01:48:59 -03:00
parent 94700f7c18
commit 7cb7d86dc4

View File

@@ -192,6 +192,9 @@ int lfs_win32_lstat(const char *path, STAT_STRUCT *buffer)
{
WIN32_FILE_ATTRIBUTE_DATA win32buffer;
if (GetFileAttributesEx(path, GetFileExInfoStandard, &win32buffer)) {
if (!(win32buffer.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT)) {
return STAT_FUNC(path, buffer);
}
buffer->st_mode = _S_IFLNK;
buffer->st_dev = 0;
buffer->st_ino = 0;