mirror of
https://github.com/lunarmodules/luafilesystem.git
synced 2026-07-22 02:53:06 +00:00
win32 lstat: if it's not a link, just do stat
This commit is contained in:
@@ -192,6 +192,9 @@ int lfs_win32_lstat(const char *path, STAT_STRUCT *buffer)
|
|||||||
{
|
{
|
||||||
WIN32_FILE_ATTRIBUTE_DATA win32buffer;
|
WIN32_FILE_ATTRIBUTE_DATA win32buffer;
|
||||||
if (GetFileAttributesEx(path, GetFileExInfoStandard, &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_mode = _S_IFLNK;
|
||||||
buffer->st_dev = 0;
|
buffer->st_dev = 0;
|
||||||
buffer->st_ino = 0;
|
buffer->st_ino = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user