projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7b172c6
)
Correctly check if a path is a directory. Fix by Brian Korver.
author
Evan Cheng
<evan.cheng@apple.com>
Thu, 7 Oct 2010 22:05:57 +0000
(22:05 +0000)
committer
Evan Cheng
<evan.cheng@apple.com>
Thu, 7 Oct 2010 22:05:57 +0000
(22:05 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115991
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/System/Unix/Path.inc
patch
|
blob
|
history
diff --git
a/lib/System/Unix/Path.inc
b/lib/System/Unix/Path.inc
index 184da1e27ac0c7a32dd76fc9495952bd7e0fb75e..4c97c4b71ccf96c89e7e3ea8aa7f82ead5b4359a 100644
(file)
--- a/
lib/System/Unix/Path.inc
+++ b/
lib/System/Unix/Path.inc
@@
-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