summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--nq.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/nq.c b/nq.c
index a324bd3..04223bd 100644
--- a/nq.c
+++ b/nq.c
@@ -121,7 +121,7 @@ usage:
 		}
 	}
 
-	dirfd = open(path, O_RDONLY);
+	dirfd = open(path, O_RDONLY | O_DIRECTORY);
 	if (dirfd < 0) {
 		perror("dir open");
 		exit(111);