From c075aa77b9010756a8865f06783ead6d7d3e0e5a Mon Sep 17 00:00:00 2001 From: apio Date: Sat, 22 Apr 2023 15:19:37 +0200 Subject: [PATCH] init: Allow empty lines in service files --- apps/init.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/init.cpp b/apps/init.cpp index 45917b06..617d1e4f 100644 --- a/apps/init.cpp +++ b/apps/init.cpp @@ -100,9 +100,12 @@ static Result load_service(StringView path) while (true) { - auto line = TRY(file->read_line(false)); + auto line = TRY(file->read_line()); if (line.is_empty()) break; + line.trim("\n"); + if (line.is_empty()) continue; + auto parts = TRY(line.split_once('=')); if (parts.size() < 2 || parts[0].is_empty() || parts[1].is_empty()) {