From f5ce7734b8c8d0a47e7f90c6d6d3b424a779a3b0 Mon Sep 17 00:00:00 2001 From: Daniel Scalzi Date: Sat, 1 Dec 2018 10:06:23 -0500 Subject: [PATCH] Ensure mods dir exists on file drop. --- app/assets/js/dropinmodutil.js | 2 ++ package-lock.json | 18 +++++++++--------- package.json | 4 ++-- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/app/assets/js/dropinmodutil.js b/app/assets/js/dropinmodutil.js index b27512c..eef42a9 100644 --- a/app/assets/js/dropinmodutil.js +++ b/app/assets/js/dropinmodutil.js @@ -71,6 +71,8 @@ exports.scanForDropinMods = function(modsDir, version) { */ exports.addDropinMods = function(files, modsdir) { + exports.validateModsDir(modsdir) + for(let f of files) { if(MOD_REGEX.exec(f.name) != null) { fs.moveSync(f.path, path.join(modsdir, f.name)) diff --git a/package-lock.json b/package-lock.json index 75584d9..954557e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -855,11 +855,11 @@ "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" }, "discord-rpc": { - "version": "github:discordjs/RPC#a80e457d3aa9969a6134693ca2102ffc731ebc04", + "version": "github:discordjs/RPC#1bd83d3b895766e25c457b031079d783678875ff", "from": "github:discordjs/RPC", "requires": { - "node-fetch": "^2.1.2", - "ws": "^5.2.1" + "node-fetch": "^2.3.0", + "ws": "^6.1.1" } }, "dmg-builder": { @@ -2198,9 +2198,9 @@ "dev": true }, "node-fetch": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.2.0.tgz", - "integrity": "sha512-OayFWziIxiHY8bCUyLX6sTpDH8Jsbp4FfYd1j1f7vZyfgkcOnAyM4oQR16f8a0s7Gl/viMGRey8eScYk4V4EZA==" + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.3.0.tgz", + "integrity": "sha512-MOd8pV3fxENbryESLgVIeaGKrdl+uaYhCSSVkjeOb/31/njTpcis5aWfdqgNlHIrKOLRbMnfPINPOML2CIFeXA==" }, "normalize-package-data": { "version": "2.4.0", @@ -3555,9 +3555,9 @@ } }, "ws": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/ws/-/ws-5.2.2.tgz", - "integrity": "sha512-jaHFD6PFv6UgoIVda6qZllptQsMlDEJkTQcybzzXDYM1XO9Y8em691FGMPmM46WGyLU4z9KMgQN+qrux/nhlHA==", + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/ws/-/ws-6.1.2.tgz", + "integrity": "sha512-rfUqzvz0WxmSXtJpPMX2EeASXabOrSMk1ruMOV3JBTBjo4ac2lDjGGsbQSyxj8Odhw5fBib8ZKEjDNvgouNKYw==", "requires": { "async-limiter": "~1.0.0" } diff --git a/package.json b/package.json index 5007220..b4a6eca 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ "dependencies": { "adm-zip": "^0.4.13", "async": "^2.6.1", - "discord-rpc": "discordjs/RPC", + "discord-rpc": "github:discordjs/RPC", "ejs": "^2.6.1", "ejs-electron": "^2.0.3", "electron-updater": "^4.0.5", @@ -94,7 +94,7 @@ }, "compression": "maximum", "files": [ - "!{dist,.gitignore,.vscode,docs,dev-app-update.yml,.travis.yml,.nvmrc,.eslintrc.scripts.json,.eslintrc.json}" + "!{dist,.gitignore,.vscode,docs,dev-app-update.yml,.travis.yml,.nvmrc,.eslintrc.json}" ], "extraResources": [ "libraries"