Prints loading message before opening the file.

This commit is contained in:
Andrea Mazzoleni 2011-04-30 10:56:47 +02:00
parent 4d3d393586
commit bdb8167320

View file

@ -202,6 +202,9 @@ void state_read(struct snapraid_state* state)
content = tommy_list_head(&state->contentlist)->data;
pathcpy(path, sizeof(path), content->content);
printf("Loading state from %s...\n", path);
f = fopen(path, "rt");
if (!f) {
/* if not found, assume empty */
@ -212,8 +215,6 @@ void state_read(struct snapraid_state* state)
exit(EXIT_FAILURE);
}
printf("Loading state from %s...\n", path);
/* start with a MD5 default. */
/* it's for compatibility with version 1.0 where MD5 was implicit. */
state->hash = HASH_MD5;