ls: Avoid printing an empty line when a directory is empty
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
apio 2023-05-02 11:00:28 +02:00
parent 0fad179485
commit 6beea7f817
Signed by: apio
GPG Key ID: B8A7D06E42258954

View File

@ -49,7 +49,7 @@ Result<int> luna_main(int argc, char** argv)
if (!long_list) if (!long_list)
{ {
auto list = TRY(String::join(files, " "_sv)); auto list = TRY(String::join(files, " "_sv));
os::println("%s", list.chars()); if (!list.is_empty()) os::println("%s", list.chars());
} }
else else
{ {