mingw: fix st_mode for symlink dirs
commit728341d401cc60fd15bd22f74b882f8d4b88f415
authorErik Faye-Lund <kusmabite@googlemail.com>
Sat, 20 Mar 2010 21:48:42 +0000 (20 22:48 +0100)
committerPat Thoyts <patthoyts@users.sourceforge.net>
Fri, 10 Sep 2010 22:44:04 +0000 (10 23:44 +0100)
tree14aacfdb49b9a10b1e9d3ccbed3c67e09de4ce36
parent14bebe7749d6ebc2ff5ae7bcee6c17762c767433
mingw: fix st_mode for symlink dirs

When encountering symlinks, do_lstat() currently overwrites
buf->st_mode with S_IFREG if follow is true. This is incorrect
when the symlink points to a directory.

get_file_attr calls GetFileAttributesExA, which follows symlinks
already. So our st_mode should already be correct at this point.

Tested-by: Pat Thoyts <patthoyts@users.sourceforge.net>
Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
compat/mingw.c