fix bug where files were never deleted from cache
It was passing the wrong time value in the recursion, which made for a really old "olderThan" time. This also then flipped the logic on the next round through the recursion, causing files to be deleted even if "Keep Cache Time" was set to "Forever". closes #719 closes #736
Šī revīzija ir iekļauta:
vecāks
aa39d7bc7f
revīzija
6046af5328
@ -139,7 +139,7 @@ public class CleanCacheService extends IntentService {
|
|||||||
long olderThan = System.currentTimeMillis() - millisAgo;
|
long olderThan = System.currentTimeMillis() - millisAgo;
|
||||||
for (File f : files) {
|
for (File f : files) {
|
||||||
if (f.isDirectory()) {
|
if (f.isDirectory()) {
|
||||||
clearOldFiles(f, olderThan);
|
clearOldFiles(f, millisAgo);
|
||||||
f.delete();
|
f.delete();
|
||||||
}
|
}
|
||||||
if (Build.VERSION.SDK_INT < 21) {
|
if (Build.VERSION.SDK_INT < 21) {
|
||||||
|
|||||||
Notiek ielāde…
x
Atsaukties uz šo jaunā problēmā
Block a user