From 1ee247acafeed7c1caa06c69f478dba3d290d5a6 Mon Sep 17 00:00:00 2001 From: Mirco Wittrien Date: Tue, 29 Sep 2020 09:10:42 +0200 Subject: [PATCH] Update 0BDFDB.plugin.js --- Library/0BDFDB.plugin.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Library/0BDFDB.plugin.js b/Library/0BDFDB.plugin.js index f9b91579ed..0c4b5aa4e5 100644 --- a/Library/0BDFDB.plugin.js +++ b/Library/0BDFDB.plugin.js @@ -2718,7 +2718,8 @@ module.exports = (_ => { BDFDB.DataUtils.save = function (data, plugin, key, id) { plugin = plugin == BDFDB && InternalBDFDB || plugin; let pluginName = typeof plugin === "string" ? plugin : plugin.name; - let configPath = LibraryRequires.path.join(BDFDB.BDUtils.getPluginsFolder(), pluginName + ".config.json"); + let fileName = pluginName == "BDFDB" ? "0BDFDB" : pluginName; + let configPath = LibraryRequires.path.join(BDFDB.BDUtils.getPluginsFolder(), fileName + ".config.json"); let config = Cache.data[pluginName] !== undefined ? Cache.data[pluginName] : (InternalBDFDB.readConfig(configPath) || {}); @@ -2747,7 +2748,8 @@ module.exports = (_ => { BDFDB.DataUtils.load = function (plugin, key, id) { plugin = plugin == BDFDB && InternalBDFDB || plugin; let pluginName = typeof plugin === "string" ? plugin : plugin.name; - let configPath = LibraryRequires.path.join(BDFDB.BDUtils.getPluginsFolder(), pluginName + ".config.json"); + let fileName = pluginName == "BDFDB" ? "0BDFDB" : pluginName; + let configPath = LibraryRequires.path.join(BDFDB.BDUtils.getPluginsFolder(), fileName + ".config.json"); let config = Cache.data[pluginName] !== undefined ? Cache.data[pluginName] : (InternalBDFDB.readConfig(configPath) || {}); let configIsObject = BDFDB.ObjectUtils.is(config); @@ -2763,7 +2765,8 @@ module.exports = (_ => { BDFDB.DataUtils.remove = function (plugin, key, id) { plugin = plugin == BDFDB && InternalBDFDB || plugin; let pluginName = typeof plugin === "string" ? plugin : plugin.name; - let configPath = LibraryRequires.path.join(BDFDB.BDUtils.getPluginsFolder(), pluginName + ".config.json"); + let fileName = pluginName == "BDFDB" ? "0BDFDB" : pluginName; + let configPath = LibraryRequires.path.join(BDFDB.BDUtils.getPluginsFolder(), fileName + ".config.json"); let config = Cache.data[pluginName] !== undefined ? Cache.data[pluginName] : (InternalBDFDB.readConfig(configPath) || {}); let configIsObject = BDFDB.ObjectUtils.is(config);