aboutsummaryrefslogtreecommitdiff
path: root/subsonic-android
diff options
context:
space:
mode:
Diffstat (limited to 'subsonic-android')
-rw-r--r--subsonic-android/src/github/daneren2005/dsub/util/CacheCleaner.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/subsonic-android/src/github/daneren2005/dsub/util/CacheCleaner.java b/subsonic-android/src/github/daneren2005/dsub/util/CacheCleaner.java
index 3b88f00e..c69a595c 100644
--- a/subsonic-android/src/github/daneren2005/dsub/util/CacheCleaner.java
+++ b/subsonic-android/src/github/daneren2005/dsub/util/CacheCleaner.java
@@ -66,6 +66,10 @@ public class CacheCleaner {
}
private long getMinimumDelete(List<File> files) {
+ if(files.size() == 0) {
+ return 0L;
+ }
+
long cacheSizeBytes = Util.getCacheSizeMB(context) * 1024L * 1024L;
long bytesUsedBySubsonic = 0L;