avoid extra long bytes formatting

This commit is contained in:
FTCHD
2026-03-17 00:00:34 +02:00
parent 887b597032
commit df3c1a8057
+1 -1
View File
@@ -7,7 +7,7 @@ const RE_PATH_SEPARATOR = /[/\\]/
export function formatBytes(bytes: number) { export function formatBytes(bytes: number) {
if (bytes < 1024) { if (bytes < 1024) {
return `${bytes} B` return `${Math.round(bytes)} B`
} }
if (bytes < 1024 * 1024) { if (bytes < 1024 * 1024) {