Merge pull request #647 from angdraug/pass-archivepath

Support non-writable working directory
pull/1/head
ansuz 4 years ago committed by GitHub
commit adc2a63bd8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -303,6 +303,8 @@ module.exports = {
*/ */
blobStagingPath: './data/blobstage', blobStagingPath: './data/blobstage',
decreePath: './data/decrees',
/* CryptPad supports logging events directly to the disk in a 'logs' directory /* 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 * Set its location here, or set it to false (or nothing) if you'd rather not log
*/ */

@ -122,6 +122,7 @@ module.exports.create = function (Env, cb) {
// create a pin store // create a pin store
Store.create({ Store.create({
filePath: pinPath, filePath: pinPath,
archivePath: Env.paths.archive,
}, w(function (err, s) { }, w(function (err, s) {
if (err) { throw err; } if (err) { throw err; }
Env.pinStore = s; Env.pinStore = s;
@ -130,7 +131,7 @@ module.exports.create = function (Env, cb) {
// create a channel store // create a channel store
Store.create({ Store.create({
filePath: Env.paths.data, filePath: Env.paths.data,
archivepath: Env.paths.archive, archivePath: Env.paths.archive,
}, w(function (err, _store) { }, w(function (err, _store) {
if (err) { throw err; } if (err) { throw err; }
Env.msgStore = _store; // API used by rpc Env.msgStore = _store; // API used by rpc

@ -87,6 +87,7 @@ Logger.create = function (config, cb) {
Store.create({ Store.create({
filePath: config.logPath, filePath: config.logPath,
archivePath: config.archivePath,
}, function (err, store) { }, function (err, store) {
if (err) { if (err) {
throw err; throw err;

@ -63,6 +63,7 @@ const init = function (config, _cb) {
})); }));
Store.create({ Store.create({
filePath: config.pinPath, filePath: config.pinPath,
archivePath: config.archivePath,
}, w(function (err, _pinStore) { }, w(function (err, _pinStore) {
if (err) { if (err) {
w.abort(); w.abort();

Loading…
Cancel
Save