summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Douillet <vincent@vdouillet.fr>2025-02-14 12:03:49 +0100
committerVincent Douillet <vincent@vdouillet.fr>2025-02-14 12:03:49 +0100
commit095b5675df915002b00a2b3f7ba0e95fde7638b5 (patch)
tree7e28d43094d9ba78e2eff984077fb30122880f01
parentfddc6610d724dc08433ea99a98406d76c47e9df1 (diff)
browse: folder size is not computed, do not show it
-rw-r--r--browse.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/browse.c b/browse.c
index d1ea975..4777938 100644
--- a/browse.c
+++ b/browse.c
@@ -241,7 +241,11 @@ file_template_callback(size_t index, void *arg)
K_OK(khtml_puts(html, data->f->action_url), r);
break;
case 3:
- /* size, print as human readable */
+ /* size, only for files, print as human readable */
+ if (data->f->is_dir) {
+ break;
+ }
+
file_size = data->f->size;
i = 0;
while (file_size > 1024 && i < 3) {