Fix path to the bdStorage.json for case-sensitive partitions

This commit is contained in:
MKody 2017-01-26 11:41:20 -05:00 committed by Nick Sarnie
parent ef10e075f6
commit f08539d5f9
No known key found for this signature in database
GPG Key ID: 37C8EB58D18EB98B
1 changed files with 3 additions and 3 deletions

View File

@ -34,9 +34,9 @@ bdPluginStorage.defaults = {
};
function initStorage() {
if(!_fs.existsSync(_cfg.dataPath + "/bdstorage.json")) {
if(!_fs.existsSync(_cfg.dataPath + "/bdStorage.json")) {
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 {
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) {
if(m) {
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 {
if(bdPluginStorage[pn] === undefined) bdPluginStorage[pn] = {};
bdPluginStorage[pn][i] = v;