init: Allow empty lines in service files

This commit is contained in:
apio 2023-04-22 15:19:37 +02:00
parent dcc6bbf055
commit c075aa77b9
Signed by: apio
GPG Key ID: B8A7D06E42258954

View File

@ -100,9 +100,12 @@ static Result<void> 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())
{