1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-07-20 10:24:18 +03:00

Fix info.usedBytes calculation giving weird result (#8445)

This commit is contained in:
Luc
2022-01-10 08:08:10 +08:00
committed by GitHub
parent 4c07113ff5
commit 2c5885e29d

View File

@ -101,7 +101,7 @@ public:
info.pageSize = 0; // TODO ?
info.maxPathLength = 255; // TODO ?
info.totalBytes =_fs.vol()->clusterCount() * info.blockSize;
info.usedBytes = info.totalBytes - (_fs.vol()->freeClusterCount() * _fs.vol()->bytesPerCluster());
info.usedBytes = (_fs.vol()->clusterCount() - _fs.vol()->freeClusterCount()) * info.blockSize;
return true;
}