From 5034d361bac53fae19398e3603ff53752a2974bf Mon Sep 17 00:00:00 2001 From: josch Date: Fri, 14 Nov 2014 13:28:19 +0100 Subject: [PATCH] store dircache in proper directory --- fuse/main.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/fuse/main.c b/fuse/main.c index af42125..19c48f5 100644 --- a/fuse/main.c +++ b/fuse/main.c @@ -175,7 +175,12 @@ static void mediafirefs_destroy() fprintf(stderr, "storing hashtable\n"); - fd = fopen("hashtable.dump", "w+"); + fd = fopen(ctx->dircache, "w+"); + + if (fd == NULL) { + fprintf(stderr, "cannot open %s for writing\n", ctx->dircache); + return; + } folder_tree_store(ctx->tree, fd);