From 6cd2131f27e5b497efa01cc4199eed4edca26f58 Mon Sep 17 00:00:00 2001 From: Dmitry Borodaenko Date: Mon, 30 Nov 2020 16:33:32 -0800 Subject: [PATCH] Pass archivePath to Store.create always --- lib/historyKeeper.js | 3 ++- lib/log.js | 1 + lib/workers/db-worker.js | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/historyKeeper.js b/lib/historyKeeper.js index 30b311eb7..fb7a5ebc8 100644 --- a/lib/historyKeeper.js +++ b/lib/historyKeeper.js @@ -122,6 +122,7 @@ module.exports.create = function (Env, cb) { // create a pin store Store.create({ filePath: pinPath, + archivePath: Env.paths.archive, }, w(function (err, s) { if (err) { throw err; } Env.pinStore = s; @@ -130,7 +131,7 @@ module.exports.create = function (Env, cb) { // create a channel store Store.create({ filePath: Env.paths.data, - archivepath: Env.paths.archive, + archivePath: Env.paths.archive, }, w(function (err, _store) { if (err) { throw err; } Env.msgStore = _store; // API used by rpc diff --git a/lib/log.js b/lib/log.js index a815500b0..abd8dee8e 100644 --- a/lib/log.js +++ b/lib/log.js @@ -87,6 +87,7 @@ Logger.create = function (config, cb) { Store.create({ filePath: config.logPath, + archivePath: config.archivePath, }, function (err, store) { if (err) { throw err; diff --git a/lib/workers/db-worker.js b/lib/workers/db-worker.js index 5750ff7ac..5274445eb 100644 --- a/lib/workers/db-worker.js +++ b/lib/workers/db-worker.js @@ -63,6 +63,7 @@ const init = function (config, _cb) { })); Store.create({ filePath: config.pinPath, + archivePath: config.archivePath, }, w(function (err, _pinStore) { if (err) { w.abort();