Skip to content

Commit 3a59c4a

Browse files
drop-in-mod機能復旧
1 parent a59622f commit 3a59c4a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

app/assets/js/dropinmodutil.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ const fs = require('fs-extra')
22
const path = require('path')
33
const { ipcRenderer, shell } = require('electron')
44
const { SHELL_OPCODE } = require('./ipcconstants')
5+
const { webUtils } = require('electron')
56

67
// Group #1: File Name (without .disabled, if any)
78
// Group #2: File Extension (jar, zip, or litemod)
@@ -81,7 +82,8 @@ exports.addDropinMods = function(files, modsdir) {
8182

8283
for(let f of files) {
8384
if(MOD_REGEX.exec(f.name) != null) {
84-
fs.moveSync(f.path, path.join(modsdir, f.name))
85+
const filePath = webUtils.getPathForFile(f)
86+
fs.moveSync(filePath, path.join(modsdir, f.name))
8587
}
8688
}
8789

0 commit comments

Comments
 (0)