diff options
author | Jilles Tjoelker <jilles@FreeBSD.org> | 2013-02-10 23:09:15 +0000 |
---|---|---|
committer | Jilles Tjoelker <jilles@FreeBSD.org> | 2013-02-10 23:09:15 +0000 |
commit | ad7d20c921c320e438be9bb783eedf37036cbee5 (patch) | |
tree | bbb1af868ec96ba9fff8388533b11dc24e6924ea | |
parent | 2871baa49acbc19c7908f6032d961abcc07cf3d9 (diff) |
Notes
-rw-r--r-- | lib/libc/gen/fts.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libc/gen/fts.c b/lib/libc/gen/fts.c index 243320cc871e0..d15be06b08c3f 100644 --- a/lib/libc/gen/fts.c +++ b/lib/libc/gen/fts.c @@ -1119,7 +1119,8 @@ fts_safe_changedir(FTS *sp, FTSENT *p, int fd, char *path) newfd = fd; if (ISSET(FTS_NOCHDIR)) return (0); - if (fd < 0 && (newfd = _open(path, O_RDONLY | O_CLOEXEC, 0)) < 0) + if (fd < 0 && (newfd = _open(path, O_RDONLY | O_DIRECTORY | + O_CLOEXEC, 0)) < 0) return (-1); if (_fstat(newfd, &sb)) { ret = -1; |