Fix path to the bdStorage.json for case-sensitive partitions
This commit is contained in:
parent
ef10e075f6
commit
f08539d5f9
|
@ -34,9 +34,9 @@ bdPluginStorage.defaults = {
|
||||||
};
|
};
|
||||||
|
|
||||||
function initStorage() {
|
function initStorage() {
|
||||||
if(!_fs.existsSync(_cfg.dataPath + "/bdstorage.json")) {
|
if(!_fs.existsSync(_cfg.dataPath + "/bdStorage.json")) {
|
||||||
bdStorage.data = bdStorage.defaults.data;
|
bdStorage.data = bdStorage.defaults.data;
|
||||||
_fs.writeFileSync(_cfg.dataPath + "/bdstorage.json", JSON.stringify(bdStorage, null, 4));
|
_fs.writeFileSync(_cfg.dataPath + "/bdStorage.json", JSON.stringify(bdStorage, null, 4));
|
||||||
} else {
|
} else {
|
||||||
bdStorage.data = JSON.parse(_fs.readFileSync(_cfg.dataPath + "/bdStorage.json"));
|
bdStorage.data = JSON.parse(_fs.readFileSync(_cfg.dataPath + "/bdStorage.json"));
|
||||||
}
|
}
|
||||||
|
@ -62,7 +62,7 @@ bdStorage.get = function(i, m, pn) {
|
||||||
bdStorage.set = function(i, v, m, pn) {
|
bdStorage.set = function(i, v, m, pn) {
|
||||||
if(m) {
|
if(m) {
|
||||||
bdStorage.data[i] = v;
|
bdStorage.data[i] = v;
|
||||||
_fs.writeFileSync(_cfg.dataPath + "/bdstorage.json", JSON.stringify(bdStorage.data, null, 4));
|
_fs.writeFileSync(_cfg.dataPath + "/bdStorage.json", JSON.stringify(bdStorage.data, null, 4));
|
||||||
} else {
|
} else {
|
||||||
if(bdPluginStorage[pn] === undefined) bdPluginStorage[pn] = {};
|
if(bdPluginStorage[pn] === undefined) bdPluginStorage[pn] = {};
|
||||||
bdPluginStorage[pn][i] = v;
|
bdPluginStorage[pn][i] = v;
|
||||||
|
|
Loading…
Reference in New Issue