Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public long getUsedSpace() {
* @return used space
*/
private long calculateUsedSpace() {
return getCapacity() - getFile().getFreeSpace();
return getCapacity() - getFile().getUsableSpace();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the record: javadoc on calculateUsedSpace still mentions "free space". I guess we can update it in any patches touching this code, no need for a new PR just for this.

Also: getAvailble() also returns getUsableSpace(), so we could clarify the logic by changing to:

getCapacity() - getAvailable()

}

}