Skip to content

Commit 2c5885e

Browse files
authored
Fix info.usedBytes calculation giving weird result (#8445)
1 parent 4c07113 commit 2c5885e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libraries/SDFS/src/SDFS.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ class SDFSImpl : public FSImpl
101101
info.pageSize = 0; // TODO ?
102102
info.maxPathLength = 255; // TODO ?
103103
info.totalBytes =_fs.vol()->clusterCount() * info.blockSize;
104-
info.usedBytes = info.totalBytes - (_fs.vol()->freeClusterCount() * _fs.vol()->bytesPerCluster());
104+
info.usedBytes = (_fs.vol()->clusterCount() - _fs.vol()->freeClusterCount()) * info.blockSize;
105105
return true;
106106
}
107107

0 commit comments

Comments
 (0)