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,17 +662,14 @@ public final class Utils {
}
for (File f : files) {
if (startsWith != null && f.getName().startsWith(startsWith)) {
continue;
}
if (endsWith != null && f.getName().endsWith(endsWith)) {
continue;
}
if ((startsWith != null && f.getName().startsWith(startsWith))
|| (endsWith != null && f.getName().endsWith(endsWith))) {
if (!f.delete()) {
Log.w(TAG, "Couldn't delete cache file " + f);
}
}
}
}
public static void debugLog(String tag, String msg) {
if (BuildConfig.DEBUG) {