Delete invalid classifier data files

This commit is contained in:
M66B 2021-01-31 20:20:07 +01:00
parent 70a2af170f
commit eb0be3f813
1 changed files with 6 additions and 1 deletions

View File

@ -396,7 +396,12 @@ public class MessageClassifier {
File file = getFile(context);
if (file.exists()) {
String json = Helper.readText(file);
try {
fromJson(new JSONObject(json));
} catch (JSONException ex) {
Log.e(ex);
file.delete();
}
}
loaded = true;