fail if hashtable cannot be loaded

This commit is contained in:
josch
2014-12-01 17:23:28 +01:00
parent febb29f75c
commit 0abe0099be

View File

@@ -553,10 +553,15 @@ static void connect_mf(struct mediafirefs_user_options *options,
fp = fopen(ctx->dircache, "r");
if (fp != NULL) {
// file exists
fprintf(stderr, "loading hashtable\n");
fprintf(stderr, "loading hashtable from %s\n", ctx->dircache);
ctx->tree = folder_tree_load(fp, ctx->filecache);
if (ctx->tree == NULL) {
fprintf(stderr, "cannot load directory hashtable\n");
exit(1);
}
fclose(fp);
folder_tree_update(ctx->tree, ctx->conn);