Fix the csync_remove_config_dir() function to remove the journal.

This commit is contained in:
Andreas Schneider 2008-05-27 15:45:18 +02:00
parent 64b35453ec
commit bbbf5ed13e

View File

@ -559,13 +559,13 @@ int csync_remove_config_dir(CSYNC *ctx) {
unlink(path);
SAFE_FREE(path);
if (asprintf(&path, "%s/%s", ctx->options.config_dir, CSYNC_JOURNAL_FILE) < 0) {
if (asprintf(&path, "%s", ctx->journal.file) < 0) {
return -1;
}
unlink(path);
SAFE_FREE(path);
if (asprintf(&path, "%s/%s.ctmp", ctx->options.config_dir, CSYNC_JOURNAL_FILE) < 0) {
if (asprintf(&path, "%s.ctmp", ctx->journal.file) < 0) {
return -1;
}
unlink(path);