state: don't consider missing state file to be a fatal error

This commit is contained in:
Ariadne Conill 2020-07-24 07:13:04 -06:00
parent 464c078bbe
commit 713d5071d5

View file

@ -45,8 +45,9 @@ lif_state_read_path(struct lif_dict *state, const char *path)
FILE *fd = fopen(path, "r"); FILE *fd = fopen(path, "r");
bool ret; bool ret;
/* if file cannot be opened, assume an empty state */
if (fd == NULL) if (fd == NULL)
return false; return true;
ret = lif_state_read(state, fd); ret = lif_state_read(state, fd);
fclose(fd); fclose(fd);