forked from OSchip/llvm-project
Correctly check if a path is a directory. Fix by Brian Korver.
llvm-svn: 115991
This commit is contained in:
parent
251f859b23
commit
139edad73a
|
@ -439,7 +439,7 @@ Path::isDirectory() const {
|
|||
struct stat buf;
|
||||
if (0 != stat(path.c_str(), &buf))
|
||||
return false;
|
||||
return buf.st_mode & S_IFDIR ? true : false;
|
||||
return ((buf.st_mode & S_IFMT) == S_IFDIR) ? true : false;
|
||||
}
|
||||
|
||||
bool
|
||||
|
|
Loading…
Reference in New Issue