diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2016-12-18 12:38:19 -0500 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2016-12-18 13:19:04 -0500 |
commit | 4b9592f93a68f88152b390898004e5e54b540cae (patch) | |
tree | 18930e6373e5e75aa2999f405971d7a29e4eebc8 /bftw.c | |
parent | 2ebbe75a8d272458cd3229b6033b2a5ce19b105b (diff) | |
download | bfs-4b9592f93a68f88152b390898004e5e54b540cae.tar.xz |
Implement -regex, -iregex, and -regextype/-E
Diffstat (limited to 'bftw.c')
-rw-r--r-- | bftw.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -341,7 +341,10 @@ static DIR *dircache_entry_open(struct dircache *cache, struct dircache_entry *e const char *at_path = path; struct dircache_entry *base = dircache_entry_base(cache, entry, &at_fd, &at_path); - int flags = O_RDONLY | O_DIRECTORY | O_CLOEXEC; + int flags = O_RDONLY | O_CLOEXEC; +#ifdef O_DIRECTORY + flags |= O_DIRECTORY; +#endif int fd = openat(at_fd, at_path, flags); if (fd < 0 && dircache_should_retry(cache, base)) { |