mingw: fix st_mode for symlink dirs
commit7b386a8a9193bce8074764edbab1bcf4f580aa55
authorErik Faye-Lund <kusmabite@googlemail.com>
Sat, 20 Mar 2010 21:48:42 +0000 (20 22:48 +0100)
committerJohannes Schindelin <johannes.schindelin@gmx.de>
Sat, 12 Jun 2010 11:09:31 +0000 (12 13:09 +0200)
tree47c4ba1f6999c70fb9199c661a08375cd15d6b24
parent33bc9999e90ae45d325f6854e2d8adc81152ef04
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