From e00955f15ce5e86a985057c271069589fd0119c0 Mon Sep 17 00:00:00 2001 From: Zachary Turner Date: Tue, 7 Mar 2017 17:48:47 +0000 Subject: [PATCH] [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 --- lib/Support/Unix/Path.inc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/Support/Unix/Path.inc b/lib/Support/Unix/Path.inc index 05636f8bcf3..76e1ed2d418 100644 --- a/lib/Support/Unix/Path.inc +++ b/lib/Support/Unix/Path.inc @@ -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(Status.st_mode); Result = -- 2.11.0