Fix regression in prefix/suffix file deletion

This partyally reverts ea3c95832ea733bb4e928772772b13638d243032.

Fixes #537.
This commit is contained in:
Daniel Martí 2016-01-06 20:48:07 +01:00
parent dfa3ba2c99
commit e3b29f9613

View File

@ -662,14 +662,11 @@ public final class Utils {
} }
for (File f : files) { for (File f : files) {
if (startsWith != null && f.getName().startsWith(startsWith)) { if ((startsWith != null && f.getName().startsWith(startsWith))
continue; || (endsWith != null && f.getName().endsWith(endsWith))) {
} if (!f.delete()) {
if (endsWith != null && f.getName().endsWith(endsWith)) { Log.w(TAG, "Couldn't delete cache file " + f);
continue; }
}
if (!f.delete()) {
Log.w(TAG, "Couldn't delete cache file " + f);
} }
} }
} }