chiark / gitweb /
tmpfiles: Fix handling of duplicate lines
[elogind.git] / src / tmpfiles / tmpfiles.c
index 917bb3c52898f0cdf80fedbeb5e90478550bdce6..652fe5f229ca653993f95cf89aa504dca0b947bf 100644 (file)
@@ -1746,9 +1746,11 @@ static int parse_line(const char *fname, unsigned line, const char *buffer) {
                 unsigned n;
 
                 for (n = 0; n < existing->count; n++) {
-                        if (!item_compatible(existing->items + n, &i))
+                        if (!item_compatible(existing->items + n, &i)) {
                                 log_warning("[%s:%u] Duplicate line for path \"%s\", ignoring.",
                                             fname, line, i.path);
+                                return 0;
+                        }
                 }
         } else {
                 existing = new0(ItemArray, 1);