mingw: fix st_mode for symlink dirs
commitc8a1530575b76c6e444c683ef77b40fa005c6942
authorErik Faye-Lund <kusmabite@googlemail.com>
Sat, 20 Mar 2010 21:48:42 +0000 (20 22:48 +0100)
committerJohannes Schindelin <johannes.schindelin@gmx.de>
Thu, 8 Apr 2010 18:30:35 +0000 (8 20:30 +0200)
tree631426127469bdc921655f19c3f5071aec45b1de
parentacc5880a61d720e9b757561314eef510bf4af45a
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