From 6cd2131f27e5b497efa01cc4199eed4edca26f58 Mon Sep 17 00:00:00 2001 From: Dmitry Borodaenko Date: Mon, 30 Nov 2020 16:33:32 -0800 Subject: [PATCH 1/2] 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(); From f49c7221b74577009f29b4a86401e59d7a57c771 Mon Sep 17 00:00:00 2001 From: Dmitry Borodaenko Date: Mon, 30 Nov 2020 16:51:05 -0800 Subject: [PATCH 2/2] Add decreePath to config.example.js --- config/config.example.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config/config.example.js b/config/config.example.js index a49d66d90..5b3e49cc4 100644 --- a/config/config.example.js +++ b/config/config.example.js @@ -295,6 +295,8 @@ module.exports = { */ blobStagingPath: './data/blobstage', + decreePath: './data/decrees', + /* CryptPad supports logging events directly to the disk in a 'logs' directory * Set its location here, or set it to false (or nothing) if you'd rather not log */