mingw: fix st_mode for symlink dirs
commit5c1e99faf4cbe2c171fcad72812d4ff8ca48b47f
authorErik Faye-Lund <kusmabite@googlemail.com>
Sat, 20 Mar 2010 21:48:42 +0000 (20 22:48 +0100)
committerPat Thoyts <patthoyts@users.sourceforge.net>
Sun, 21 Mar 2010 12:08:33 +0000 (21 12:08 +0000)
tree48c35381caf9b514896f44d8d700f141d7827f8e
parent9d2ad68fc674c54698248d7834151e250fd70f64
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