mingw: fix st_mode for symlink dirs
commitf971b944805779ff503093314b80e7cad9525d9f
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, 12 Apr 2010 12:56:19 +0000 (12 14:56 +0200)
treec4b86202ee65873e978c331079586c8297e7fd48
parent6e5ac68edf823e6441fbc227a20431d1976e6514
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