mingw: fix st_mode for symlink dirs
commit3069b65eea55490be55e0fb85e23a6e067ee3d43
authorErik Faye-Lund <kusmabite@googlemail.com>
Sat, 20 Mar 2010 21:48:42 +0000 (20 22:48 +0100)
committerlmfadmin <lmfadmin@ubuntu.ubuntu-domain>
Fri, 3 Sep 2010 12:28:42 +0000 (3 13:28 +0100)
tree3635765666f490403bfa76db04adabb77f96e06d
parent83553395660a3366c42c5a2132528b02743ce46c
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