Merge "Use more intention-revealing tests for S_ISLNK and S_ISSOCK."
This commit is contained in:
@ -56,9 +56,11 @@ FileType getFileType(const char* fileName)
|
||||
return kFileTypeBlockDev;
|
||||
else if (S_ISFIFO(sb.st_mode))
|
||||
return kFileTypeFifo;
|
||||
#ifdef HAVE_SYMLINKS
|
||||
#if defined(S_ISLNK)
|
||||
else if (S_ISLNK(sb.st_mode))
|
||||
return kFileTypeSymlink;
|
||||
#endif
|
||||
#if defined(S_ISSOCK)
|
||||
else if (S_ISSOCK(sb.st_mode))
|
||||
return kFileTypeSocket;
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user