fix: webui formatDirSize (#568)

pull/577/head
sigoden 2025-04-07 07:36:49 +08:00 committed by GitHub
parent 09200860b4
commit 59685da06e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -881,8 +881,8 @@ function padZero(value, size) {
}
function formatDirSize(size) {
const unit = file.size === 1 ? "item" : "items";
const num = size >= MAX_SUBPATHS_COUNT ? `>${MAX_SUBPATHS_COUNT - 1}` : `${file.size}`;
const unit = size === 1 ? "item" : "items";
const num = size >= MAX_SUBPATHS_COUNT ? `>${MAX_SUBPATHS_COUNT - 1}` : `${size}`;
return ` ${num} ${unit}`;
}