Skip to content
Snippets Groups Projects
Commit eb4e9022 authored by David Vasek's avatar David Vasek
Browse files

zone backup: remove an excessive directory creation

The directory has already been created before as a part of the lockfile preparation.
parent b471b6ad
No related branches found
No related tags found
No related merge requests found
......@@ -84,15 +84,6 @@ int zone_backup_init(bool restore_mode, const char *backup_dir,
pthread_mutex_init(&ctx->readers_mutex, NULL);
if (!restore_mode) {
int ret = mkdir(backup_dir, 0750);
if (ret == -1 && errno != EEXIST) {
pthread_mutex_destroy(&ctx->readers_mutex);
free(ctx);
return knot_map_errno();
}
}
char db_dir[backup_dir_len + 16];
(void)snprintf(db_dir, sizeof(db_dir), "%s/keys", backup_dir);
knot_lmdb_init(&ctx->bck_kasp_db, db_dir, kasp_db_size, 0, "keys_db");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment