[fs] Make sure to check S_ISLNK() in fillStatus.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297167 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Zachary Turner 2017-03-07 17:48:47 +00:00
parent 5eee35ff8f
commit e00955f15c

View File

@ -500,6 +500,8 @@ static std::error_code fillStatus(int StatRet, const struct stat &Status,
Type = file_type::fifo_file;
else if (S_ISSOCK(Status.st_mode))
Type = file_type::socket_file;
else if (S_ISLNK(Status.st_mode))
Type = file_type::symlink_file;
perms Perms = static_cast<perms>(Status.st_mode);
Result =