From 3e36ac78250fe64240121d4a17b279a566aeef28 Mon Sep 17 00:00:00 2001 From: daneren2005 Date: Thu, 28 Feb 2013 15:26:53 -0800 Subject: Fix error when no files to delete --- subsonic-android/src/github/daneren2005/dsub/util/CacheCleaner.java | 4 ++++ 1 file changed, 4 insertions(+) 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 files) { + if(files.size() == 0) { + return 0L; + } + long cacheSizeBytes = Util.getCacheSizeMB(context) * 1024L * 1024L; long bytesUsedBySubsonic = 0L; -- cgit v1.2.3