diff --git a/src/parse/parse.c b/src/parse/parse.c index c214448..d9948b2 100644 --- a/src/parse/parse.c +++ b/src/parse/parse.c @@ -165,8 +165,15 @@ parse_keywords(const char *filename) return NULL; } + if (st.st_size == 0) { + warnx("%s: empty file", filename); + close(fd); + return NULL; + } + if (!realpath(filename, path)) { warn("%s", filename); + close(fd); return NULL; }