Fix metadata calculation when folder size is 0

This commit is contained in:
Thomas Piccirello 2025-06-08 22:43:54 -07:00
commit 352221ebae
No known key found for this signature in database

View file

@ -213,8 +213,8 @@ window.qBittorrent.FileTree ??= (() => {
}
root.checked = root.autoCalculateCheckedState ? root.checked : TriState.Checked;
root.progress /= root.size;
root.availability /= root.size;
root.progress = (root.size > 0) ? (root.progress / root.size) : 0;
root.availability = (root.size > 0) ? (root.availability / root.size) : 0;
}
stack.pop();