Updated getFreeSpaceAvailable() method

This commit is contained in:
daniel oeh 2012-12-31 17:41:11 +01:00
parent 0978fbacb1
commit 705693ea0c
1 changed files with 2 additions and 2 deletions

View File

@ -49,8 +49,8 @@ public class StorageUtils {
/** Get the number of free bytes that are available on the external storage. */
public static long getFreeSpaceAvailable() {
StatFs stat = new StatFs(Environment.getExternalStorageDirectory()
.getPath());
StatFs stat = new StatFs(PodcastApp.getDataFolder(
PodcastApp.getInstance(), null).getAbsolutePath());
long availableBlocks = stat.getAvailableBlocks();
long blockSize = stat.getBlockSize();
return availableBlocks * blockSize;