Skip to content
Open
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
4 changes: 1 addition & 3 deletions src/android/DirectoryManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,7 @@ public static long getFreeExternalStorageSpace() {
public static long getFreeSpaceInBytes(String path) {
try {
StatFs stat = new StatFs(path);
long blockSize = stat.getBlockSize();
long availableBlocks = stat.getAvailableBlocks();
return availableBlocks * blockSize;
return stat.getAvailableBytes();
} catch (IllegalArgumentException e) {
// The path was invalid. Just return 0 free bytes.
return 0;
Expand Down