From c525da3f9b2c282264b20ec1a56dd986c54ba7e6 Mon Sep 17 00:00:00 2001 From: Raheman Vaiya Date: Fri, 10 Mar 2023 13:52:11 -0500 Subject: [PATCH] Ignore directories in /dev/input (#426) --- src/device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/device.c b/src/device.c index 3510501..ec22b4e 100644 --- a/src/device.c +++ b/src/device.c @@ -177,7 +177,7 @@ int device_scan(struct device devices[MAX_DEVICES]) } while((ent = readdir(dh))) { - if (!strncmp(ent->d_name, "event", 5)) { + if (ent->d_type != DT_DIR && !strncmp(ent->d_name, "event", 5)) { assert(n < MAX_DEVICES); struct device_worker *w = &workers[n++];