From b5060a5e466533b7ffe0cc13dc59ba4c7ffa8dd5 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Mon, 2 Apr 2018 17:19:01 -0700 Subject: [PATCH] ircd::db: Create specific DB dir manually to avoid rocksdb error log msg. --- ircd/db.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ircd/db.cc b/ircd/db.cc index cd3d7004d..5258fdd1e 100644 --- a/ircd/db.cc +++ b/ircd/db.cc @@ -379,6 +379,11 @@ try columns.size()); } + // If the directory does not exist, though rocksdb will create it, we can + // avoid scaring the user with an error log message if we just do that.. + if(opts.create_if_missing && !fs::is_dir(path)) + fs::mkdir(path); + // Announce attempt before usual point where exceptions are thrown log.debug("Opening database \"%s\" @ `%s' columns[%zu]", this->name,