summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Faure <faure@kde.org>2023-09-26 00:19:50 +0200
committerDavid Faure <faure@kde.org>2023-09-26 00:21:05 +0200
commit179296748e92bd91bf531656632a1056307fb7b7 (patch)
treea2ccf2da34d0ed94c9652a4320b027f65a0727ba
parent3e7ee2dc8edde524858ad9a109dabe26980cf2e5 (diff)
Error in case of malformed line in the 'list' file
This should catch the case where people just write a filename and forget the expected mimetype, like this ended up fixing: https://gitlab.freedesktop.org/xdg/shared-mime-info/-/merge_requests/243
-rw-r--r--src/test-mime-data.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/test-mime-data.c b/src/test-mime-data.c
index 14fb94e..f8dbe1e 100644
--- a/src/test-mime-data.c
+++ b/src/test-mime-data.c
@@ -203,6 +203,7 @@ read_from_file (const char *filename)
if (!space)
{
fprintf (stderr, "Malformed line in %s:%d\n\t%s\n", filename, lineno, line);
+ failed++;
continue;
}