mingw: fix st_mode for symlink dirs
commit67c196d6e369589ad887511e89af76892374de03
authorErik Faye-Lund <kusmabite@googlemail.com>
Sat, 20 Mar 2010 21:48:42 +0000 (20 22:48 +0100)
committerJohannes Schindelin <johannes.schindelin@gmx.de>
Mon, 5 Jul 2010 09:02:51 +0000 (5 11:02 +0200)
treef473941d2be06f35e838ac02d3c1d72e73a662d1
parentf083f12875cd38df84e55cf00e63a248e0f3470f
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