Skip to content

Commit 59a5611

Browse files
luc-githubhasenradball
authored andcommitted
Fix info.usedBytes calculation giving weird result (esp8266#8445)
1 parent 437eb79 commit 59a5611

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: 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)