It appears that fs.lstat() has regressed, such stats.isDirectory() will always return false regardless if the path is an actual directory.
screenshot example:

Your example seems to be working as intended: The difference between lstat and stat is that lstat returns information about the link itself, if the path points to one, so you get information about ./x, not ../x. And ./x is a symbolic link, not a directory.
@addaleax since fstat is for a descriptor, and stat is not for a link, how do you check if a symlink is a dir using fs?
@avoidwork You don鈥檛 want fstat if you don鈥檛 have a file descriptor. Just using plain stat should do, if I understand you correctly.
i need more coffee; i didn't realize lstat was intended for the link itself, i erroneously assumed it was a stat for the linked object :D
