mirror of https://github.com/M66B/FairEmail.git
Delete invalid classifier data files
This commit is contained in:
parent
70a2af170f
commit
eb0be3f813
|
@ -396,7 +396,12 @@ public class MessageClassifier {
|
||||||
File file = getFile(context);
|
File file = getFile(context);
|
||||||
if (file.exists()) {
|
if (file.exists()) {
|
||||||
String json = Helper.readText(file);
|
String json = Helper.readText(file);
|
||||||
fromJson(new JSONObject(json));
|
try {
|
||||||
|
fromJson(new JSONObject(json));
|
||||||
|
} catch (JSONException ex) {
|
||||||
|
Log.e(ex);
|
||||||
|
file.delete();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
loaded = true;
|
loaded = true;
|
||||||
|
|
Loading…
Reference in New Issue