Don't file if file doesn't exist
This commit is contained in:
parent
5c663e7b24
commit
6aa8c07ab3
@ -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();
|
||||||
|
Loading…
Reference in New Issue
Block a user