mirror of
https://github.com/xorgy/mediafire-fuse
synced 2026-01-13 21:24:28 -08:00
fail if hashtable cannot be loaded
This commit is contained in:
@@ -553,10 +553,15 @@ static void connect_mf(struct mediafirefs_user_options *options,
|
|||||||
fp = fopen(ctx->dircache, "r");
|
fp = fopen(ctx->dircache, "r");
|
||||||
if (fp != NULL) {
|
if (fp != NULL) {
|
||||||
// file exists
|
// file exists
|
||||||
fprintf(stderr, "loading hashtable\n");
|
fprintf(stderr, "loading hashtable from %s\n", ctx->dircache);
|
||||||
|
|
||||||
ctx->tree = folder_tree_load(fp, ctx->filecache);
|
ctx->tree = folder_tree_load(fp, ctx->filecache);
|
||||||
|
|
||||||
|
if (ctx->tree == NULL) {
|
||||||
|
fprintf(stderr, "cannot load directory hashtable\n");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
|
|
||||||
folder_tree_update(ctx->tree, ctx->conn);
|
folder_tree_update(ctx->tree, ctx->conn);
|
||||||
|
|||||||
Reference in New Issue
Block a user