Don't file if file doesn't exist

This commit is contained in:
serso 2016-01-12 14:29:24 +01:00
parent 5c663e7b24
commit 6aa8c07ab3

View File

@ -121,6 +121,9 @@ public class History {
@Nonnull @Nonnull
private static List<HistoryState> loadStates(@Nonnull File file) { private static List<HistoryState> loadStates(@Nonnull File file) {
if (!file.exists()) {
return Collections.emptyList();
}
final CharSequence json = FileLoader.load(file); final CharSequence json = FileLoader.load(file);
if (TextUtils.isEmpty(json)) { if (TextUtils.isEmpty(json)) {
return Collections.emptyList(); return Collections.emptyList();