When passing a symlink to a directory, getftype() returns "file" on Windows.
I think it should return "dir" as same as a junction. (Returning "link"
might cause trouble, because many people don't care about symlinks on Windows.)
This is caused by a bug of VC runtime which was fixed by VC2015. VC2013 or
earlier and MinGW have this bug. (I don't know about other old compilers
like BCC.)
Attached patch fixes the problem.
Note: Creating a symlink on Windows needs admin rights, so we cannot write
tests for this.
Regards,
Ken Takata