Added drag/drop functionality to the add mods button.
You can now drag one or more files onto the add mods button in order to add them to the mods directory. Only jar, litemod, and zip files will be moved. Changed eslint to use a single configuration file, with overrides for the UI scripts. Now using fs-extra, replace usages of rimraf and mkdirp with fs-extra functions.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
const {ipcRenderer} = require('electron')
|
||||
const fs = require('fs-extra')
|
||||
const os = require('os')
|
||||
const path = require('path')
|
||||
const rimraf = require('rimraf')
|
||||
|
||||
const ConfigManager = require('./configmanager')
|
||||
const DistroManager = require('./distromanager')
|
||||
@@ -56,7 +56,7 @@ DistroManager.pullRemote().then((data) => {
|
||||
})
|
||||
|
||||
// Clean up temp dir incase previous launches ended unexpectedly.
|
||||
rimraf(path.join(os.tmpdir(), ConfigManager.getTempNativeFolder()), (err) => {
|
||||
fs.remove(path.join(os.tmpdir(), ConfigManager.getTempNativeFolder()), (err) => {
|
||||
if(err){
|
||||
logger.warn('Error while cleaning natives directory', err)
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user