From 3f9ac88c6e7003edcd7c3782246878ac1ae26415 Mon Sep 17 00:00:00 2001 From: David Isaksson Date: Wed, 24 Mar 2021 21:14:16 +0100 Subject: [PATCH] PropertiesWindow: Show the file size in a human readable format --- Userland/Applications/FileManager/PropertiesWindow.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Userland/Applications/FileManager/PropertiesWindow.cpp b/Userland/Applications/FileManager/PropertiesWindow.cpp index e59f278d99..97ec4203c2 100644 --- a/Userland/Applications/FileManager/PropertiesWindow.cpp +++ b/Userland/Applications/FileManager/PropertiesWindow.cpp @@ -26,6 +26,7 @@ #include "PropertiesWindow.h" #include +#include #include #include #include @@ -128,7 +129,7 @@ PropertiesWindow::PropertiesWindow(const String& path, bool disable_rename, Wind } } - properties.append({ "Size:", String::formatted("{} bytes", st.st_size) }); + properties.append({ "Size:", human_readable_size_long(st.st_size) }); properties.append({ "Owner:", String::formatted("{} ({})", owner_name, st.st_uid) }); properties.append({ "Group:", String::formatted("{} ({})", group_name, st.st_gid) }); properties.append({ "Created at:", GUI::FileSystemModel::timestamp_string(st.st_ctime) });