mirror of
https://github.com/nextcloud/desktop.git
synced 2024-10-25 13:55:47 +03:00
csync: Move the statedb (journal) to the local directory.
This commit is contained in:
parent
42421cb4cc
commit
76e6fbb72f
1 changed files with 5 additions and 7 deletions
12
src/csync.c
12
src/csync.c
|
@ -246,14 +246,12 @@ int csync_init(CSYNC *ctx) {
|
||||||
|
|
||||||
/* create/load statedb */
|
/* create/load statedb */
|
||||||
if (! csync_is_statedb_disabled(ctx)) {
|
if (! csync_is_statedb_disabled(ctx)) {
|
||||||
uint64_t h = csync_create_statedb_hash(ctx);
|
rc = asprintf(&ctx->statedb.file, "%s/.csync_journal.db",
|
||||||
if (asprintf(&ctx->statedb.file, "%s/csync_statedb_%llu.db",
|
ctx->local.uri);
|
||||||
ctx->options.config_dir, (long long unsigned int) h) < 0) {
|
if (rc < 0) {
|
||||||
rc = -1;
|
goto out;
|
||||||
goto out;
|
|
||||||
}
|
}
|
||||||
CSYNC_LOG(CSYNC_LOG_PRIORITY_DEBUG, "Remote replica: %s", ctx->remote.uri);
|
CSYNC_LOG(CSYNC_LOG_PRIORITY_DEBUG, "Journal: %s", ctx->statedb.file);
|
||||||
CSYNC_LOG(CSYNC_LOG_PRIORITY_DEBUG, "Statedb: %s", ctx->statedb.file);
|
|
||||||
|
|
||||||
if (csync_statedb_load(ctx, ctx->statedb.file) < 0) {
|
if (csync_statedb_load(ctx, ctx->statedb.file) < 0) {
|
||||||
rc = -1;
|
rc = -1;
|
||||||
|
|
Loading…
Reference in a new issue