aboutsummaryrefslogtreecommitdiffstats
path: root/src/renderer.rs
diff options
context:
space:
mode:
authorSven-Hendrik Haase <svenstaro@gmail.com>2025-03-09 06:55:03 +0000
committerSven-Hendrik Haase <svenstaro@gmail.com>2025-03-09 06:55:03 +0000
commit3351805fffadcb9747f772ca9ea05e0d6d13619c (patch)
treed7c666d625d709354fcf03c31deaaf69d7e90fdb /src/renderer.rs
parentFix lints on Windows (diff)
downloadminiserve-3351805fffadcb9747f772ca9ea05e0d6d13619c.tar.gz
miniserve-3351805fffadcb9747f772ca9ea05e0d6d13619c.zip
Fix dir size calculation for percent-encoded paths with spaces
Diffstat (limited to 'src/renderer.rs')
-rw-r--r--src/renderer.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/renderer.rs b/src/renderer.rs
index d6b01c8..6a8b808 100644
--- a/src/renderer.rs
+++ b/src/renderer.rs
@@ -684,7 +684,7 @@ fn page_header(
body: JSON.stringify({
DirSize: dir
})
- }).then(resp => resp.text())
+ }).then(resp => resp.ok ? resp.text() : "~")
}
// Initialize shimmer effects for .size-cell elements in .entry-type-directory rows