Mod config bug fixes, electron upgrade.
If the instance mods directory does not exist when the 'Add Drop-In Mod' button is clicked, it will be created. The update selected server code has been modified. Previously, the server would be updated before the mod config was saved. This has been fixed so that the mod config is saved before the server is switched. Updated electron to v3.0.10.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
const fs = require('fs')
|
||||
const mkpath = require('mkdirp')
|
||||
const path = require('path')
|
||||
const { shell } = require('electron')
|
||||
|
||||
@@ -8,6 +9,18 @@ const { shell } = require('electron')
|
||||
const MOD_REGEX = /^(.+(jar|zip|litemod))(?:\.(disabled))?$/
|
||||
const DISABLED_EXT = '.disabled'
|
||||
|
||||
/**
|
||||
* Validate that the given mods directory exists. If not,
|
||||
* it is created.
|
||||
*
|
||||
* @param {string} modsDir The path to the mods directory.
|
||||
*/
|
||||
exports.validateModsDir = function(modsDir) {
|
||||
if(!fs.existsSync(modsDir)) {
|
||||
mkpath.sync(modsDir)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Scan for drop-in mods in both the mods folder and version
|
||||
* safe mods folder.
|
||||
|
||||
Reference in New Issue
Block a user