Fix bin/extractPadData on windows
parent
18b6cf1534
commit
af25606ea8
|
@ -13,8 +13,8 @@ var padId = process.argv[2];
|
||||||
var db, dirty, padManager, pad, settings;
|
var db, dirty, padManager, pad, settings;
|
||||||
var neededDBValues = ["pad:"+padId];
|
var neededDBValues = ["pad:"+padId];
|
||||||
|
|
||||||
var npm = require("../src/node_modules/npm");
|
var npm = require("../node_modules/ep_etherpad-lite/node_modules/npm");
|
||||||
var async = require("../src/node_modules/async");
|
var async = require("../node_modules/ep_etherpad-lite/node_modules/async");
|
||||||
|
|
||||||
async.series([
|
async.series([
|
||||||
// load npm
|
// load npm
|
||||||
|
@ -33,8 +33,8 @@ async.series([
|
||||||
},
|
},
|
||||||
// load modules
|
// load modules
|
||||||
function(callback) {
|
function(callback) {
|
||||||
settings = require('../src/node/utils/Settings');
|
settings = require('../node_modules/ep_etherpad-lite/node/utils/Settings');
|
||||||
db = require('../src/node/db/DB');
|
db = require('../node_modules/ep_etherpad-lite/node/db/DB');
|
||||||
dirty = require("../node_modules/ep_etherpad-lite/node_modules/ueberDB/node_modules/dirty")(padId + ".db");
|
dirty = require("../node_modules/ep_etherpad-lite/node_modules/ueberDB/node_modules/dirty")(padId + ".db");
|
||||||
callback();
|
callback();
|
||||||
},
|
},
|
||||||
|
@ -46,7 +46,7 @@ async.series([
|
||||||
//get the pad
|
//get the pad
|
||||||
function (callback)
|
function (callback)
|
||||||
{
|
{
|
||||||
padManager = require('../src/node/db/PadManager');
|
padManager = require('../node_modules/ep_etherpad-lite/node/db/PadManager');
|
||||||
|
|
||||||
padManager.getPad(padId, function(err, _pad)
|
padManager.getPad(padId, function(err, _pad)
|
||||||
{
|
{
|
||||||
|
@ -84,7 +84,7 @@ async.series([
|
||||||
{
|
{
|
||||||
if(err) { callback(err); return}
|
if(err) { callback(err); return}
|
||||||
|
|
||||||
if(typeof dbvalue != 'object'){
|
if(dbvalue && typeof dbvalue != 'object'){
|
||||||
dbvalue=JSON.parse(dbvalue); // if its not json then parse it as json
|
dbvalue=JSON.parse(dbvalue); // if its not json then parse it as json
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue