This reverts commit c0c92fea3d, reversing changes made to bfc73bcfd2. stat() will never return S_IFLNK as the file type, as stat() explicitly follows symlinks. Fixes #3005.
c0c92fea3d
bfc73bcfd2