diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/unit.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -135,6 +135,13 @@ int unit_load_file(const char *path, Unit *out) { const char *val = (const char *)event.data.scalar.value; if (!in_value) { + /* Sequence items (logs list) arrive as scalars without a + * preceding key — handle them directly as values */ + if (section == SECTION_LOGS) { + if (out->log_count < 4) + strncpy(out->log_paths[out->log_count++], val, + MAX_PATH - 1); + } else { /* This is a key */ strncpy(last_key, val, sizeof(last_key) - 1); @@ -149,6 +156,7 @@ int unit_load_file(const char *path, Unit *out) { section = SECTION_ACTIONS; else in_value = 1; + } } else { /* This is a value */ in_value = 0; |
