1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 16:57:35 +00:00

AK+Userland: Return String from human_readable_size() functions

This commit is contained in:
Sam Atkins 2024-01-24 12:16:32 +00:00 committed by Andreas Kling
parent 7e8cfb60eb
commit 388856dc7e
7 changed files with 23 additions and 23 deletions

View file

@ -324,7 +324,7 @@ ErrorOr<void> Client::handle_directory_listing(String const& requested_path, Str
TRY(builder.try_append(escape_html_entities(name)));
TRY(builder.try_append("</a></td><td>&nbsp;</td>"sv));
TRY(builder.try_appendff("<td>{:10}</td><td>&nbsp;</td>", is_directory ? "-" : human_readable_size(st.st_size)));
TRY(builder.try_appendff("<td>{:10}</td><td>&nbsp;</td>", is_directory ? "-"_string : human_readable_size(st.st_size)));
TRY(builder.try_append("<td>"sv));
TRY(builder.try_append(TRY(Core::DateTime::from_timestamp(st.st_mtime).to_string())));
TRY(builder.try_append("</td>"sv));