mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-23 02:29:18 +00:00
Correctly check if a path is a directory. Fix by Brian Korver.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115991 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
7b172c6ae6
commit
a98111cf15
@ -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
Block a user