summaryrefslogtreecommitdiffstats
path: root/eval.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2017-04-30 18:32:11 -0400
committerTavian Barnes <tavianator@tavianator.com>2017-04-30 18:32:11 -0400
commit3f2d0b48cab355f34bbf18ebd49cf8f30d0ba8b5 (patch)
treee849de766e7faf5f9150b8e207c18b98b6a94ed5 /eval.c
parentfacf34bd2ffc16eb2a5e770d9be3d8010b4add42 (diff)
downloadbfs-3f2d0b48cab355f34bbf18ebd49cf8f30d0ba8b5.tar.xz
Don't forget an access mode to openat() in -empty
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/eval.c b/eval.c
index 67f46d6..34fad7e 100644
--- a/eval.c
+++ b/eval.c
@@ -319,7 +319,7 @@ bool eval_empty(const struct expr *expr, struct eval_state *state) {
struct BFTW *ftwbuf = state->ftwbuf;
if (ftwbuf->typeflag == BFTW_DIR) {
- int flags = 0;
+ int flags = O_RDONLY | O_CLOEXEC;
#ifdef O_DIRECTORY
flags |= O_DIRECTORY;
#endif