mingw: fix st_mode for symlink dirs
commit5bbaae2a6f79d828d18b4ddab55ad17ffff6bba8
authorErik Faye-Lund <kusmabite@googlemail.com>
Sat, 20 Mar 2010 21:48:42 +0000 (20 22:48 +0100)
committerJohannes Schindelin <johannes.schindelin@gmx.de>
Wed, 7 Apr 2010 20:20:36 +0000 (7 22:20 +0200)
treebf1d5b82f29d4264b74cf19ba8d943bda7ba616d
parent93c41c10cd006b89141c8d812efb7c15d86f7835
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