Fix IsSymLink on Linux (#147)

IsSymlink was giving faulty results when finding recursive files on Linux. I've updated the function to use the built-in POSIX macro for checking if a file is a symlink.
This commit is contained in:
DaanDeMeyer 2017-12-16 17:32:10 +01:00 committed by Fangrui Song
parent c0c3fc41a4
commit 4aa92466eb

View File

@ -335,7 +335,7 @@ bool IsSymLink(const std::string& path) {
struct stat buf;
int result;
result = lstat(path.c_str(), &buf);
return result == 0;
return S_ISLNK(buf.st_mode);
}
std::vector<std::string> GetPlatformClangArguments() {