summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/fs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/fs.c b/fs/fs.c
index 5b0681dd68..a613b1ae2b 100644
--- a/fs/fs.c
+++ b/fs/fs.c
@@ -370,7 +370,7 @@ int open(const char *pathname, int flags, ...)
exist = (stat(path, &s) == 0) ? 1 : 0;
- if (exist && (s.st_mode & S_IFDIR)) {
+ if (exist && S_ISDIR(s.st_mode)) {
errno = -EISDIR;
goto out1;
}