Skip to content

Commit

Permalink
Only read .kong files
Browse files Browse the repository at this point in the history
  • Loading branch information
RobDangerous committed Sep 24, 2024
1 parent 909e938 commit 7fadc82
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Sources/kong.c
Original file line number Diff line number Diff line change
Expand Up @@ -831,7 +831,11 @@ int main(int argc, char **argv) {
strcat(path, "/");
strcat(path, f.name);

read_file(path);
size_t length = strlen(path);
size_t dotkong_length = strlen(".kong");
if (length > dotkong_length && strcmp(&path[length - dotkong_length], ".kong") == 0) {
read_file(path);
}

f = read_next_file(&dir);
}
Expand Down

0 comments on commit 7fadc82

Please sign in to comment.