mingw: fix st_mode for symlink dirs
commit6648ed6b0386380ca5d184c2e8607009e1c51649
authorErik Faye-Lund <kusmabite@googlemail.com>
Sat, 20 Mar 2010 21:48:42 +0000 (20 22:48 +0100)
committerJohannes Schindelin <johannes.schindelin@gmx.de>
Fri, 11 Jun 2010 14:20:01 +0000 (11 16:20 +0200)
treec81f9d040185a338397f2503a57c92e23a272156
parent55e205d03d673762d4afd97e490f06eedbc19624
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