mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-13 23:14:53 +09:00
Tried to fix path problem in the master db
This commit is contained in:
1 parent
cf0c3b012a
commit
6962324a45
2 files changed
+8
-2
No files matched your search
@@ -218,7 +218,11 @@ app.get('/metrics', (req, res) => {
|
||||
var Datastore = require('nedb');
|
||||
db = {};
|
||||
var LinvoDB = require("linvodb3");
|
||||
LinvoDB.dbPath = path.resolve(config.databaseDirectory, "/linvodb/");
|
||||
|
||||
// TODO: This breaks. databaseDirectory is either "database" or "./database". `LinvoDB.dbPath = "./database/linvodb/";` is the old working version.
|
||||
LinvoDB.dbPath = path.resolve(config.databaseDirectory, "linvodb");
|
||||
// LinvoDB.dbPath = "./database/linvodb/";
|
||||
|
||||
// database for items in system
|
||||
// db.items = new Datastore({ filename: 'database/items.db', autoload: true });
|
||||
|
||||
|
||||
@@ -2,11 +2,12 @@ var mkdirp = require("mkdirp-promise");
|
||||
var mkdirpSync = require("mkdirp").sync;
|
||||
var fs = require("fs");
|
||||
var events = require("events");
|
||||
var path = require("path");
|
||||
|
||||
var objectOps = require("./../../lib/objectOps");
|
||||
|
||||
var LinvoDB = require("linvodb3");
|
||||
LinvoDB.dbPath = "./database/linvodb/";
|
||||
// LinvoDB.dbPath = "./database/linvodb/";
|
||||
|
||||
|
||||
let allowLogging = true;
|
||||
@@ -20,6 +21,7 @@ module.exports = class chunkStore {
|
||||
this.chunkSize = chunkSize;
|
||||
this.path = (path[path.length] == "/") ? path : path+"/";
|
||||
mkdirpSync(path+name);
|
||||
LinvoDB.dbPath = this.path;
|
||||
|
||||
this.db = new LinvoDB(name, {}, {});
|
||||
|
||||
|
||||
Reference in new issue
Block a user