diff options
author | daneren2005 <daneren2005@gmail.com> | 2013-02-28 15:26:53 -0800 |
---|---|---|
committer | daneren2005 <daneren2005@gmail.com> | 2013-02-28 15:26:53 -0800 |
commit | 3e36ac78250fe64240121d4a17b279a566aeef28 (patch) | |
tree | 113443722a767305caeecb05214b8479212d1944 /subsonic-android | |
parent | bddf9e19783b9ec6d1841c56b8a8990f8c36e166 (diff) | |
download | dsub-3e36ac78250fe64240121d4a17b279a566aeef28.tar.gz dsub-3e36ac78250fe64240121d4a17b279a566aeef28.tar.bz2 dsub-3e36ac78250fe64240121d4a17b279a566aeef28.zip |
Fix error when no files to delete
Diffstat (limited to 'subsonic-android')
-rw-r--r-- | subsonic-android/src/github/daneren2005/dsub/util/CacheCleaner.java | 4 |
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; |