This commit is contained in:
jpirnay
2026-03-16 23:44:25 +01:00
parent fd685a5e14
commit 65e100d196
+6 -1
View File
@@ -81,7 +81,12 @@ uint64_t HalStorage::sdUsedBytes() const {
return (clusterCount - cappedFreeClusters) * bytesPerCluster;
}
uint64_t HalStorage::sdFreeBytes() const { return sdTotalBytes() - sdUsedBytes(); }
uint64_t HalStorage::sdFreeBytes() const {
uint64_t total = sdTotalBytes();
uint64_t used = sdUsedBytes();
if (total <= used) return 0;
return total - used;
}
class HalFile::Impl {
public: