This commit is contained in:
Mirco Wittrien 2020-07-28 22:33:55 +02:00
parent 1d2a4cc9e1
commit 34b2707580
2 changed files with 2 additions and 2 deletions

View File

@ -242,7 +242,7 @@
if (error) return BDFDB.LogUtils.warn("Unable to get update for " + pluginName);
BDFDB.InternalData.creationTime = 0;
let wasEnabled = BDFDB.BDUtils.isPluginEnabled(pluginName);
let newName = body.match(/"name"\s*:\s*"([^"]+)"/)[1];
let newName = (body.match(/"name"\s*:\s*"([^"]+)"/) || [])[1] || pluginName;
let newVersion = body.match(/['"][0-9]+\.[0-9]+\.[0-9]+['"]/i).toString().replace(/['"]/g, "");
let oldVersion = window.PluginUpdates.plugins[url].version;
LibraryRequires.fs.writeFile(LibraryRequires.path.join(BDFDB.BDUtils.getPluginsFolder(), newName + ".plugin.js"), body, _ => {

File diff suppressed because one or more lines are too long