mingw: fix st_mode for symlink dirs
commit85240f54616ff58c7fadfd93254e3d9f3f0d3bd1
authorErik Faye-Lund <kusmabite@googlemail.com>
Sat, 20 Mar 2010 21:48:42 +0000 (20 22:48 +0100)
committerPat Thoyts <patthoyts@users.sourceforge.net>
Mon, 20 Sep 2010 14:53:13 +0000 (20 15:53 +0100)
tree11a13412099dd335effbf0db8fe4fb3365aa03a0
parent239fafd45e97285ededa11d26a0ba345d093789f
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