Skip to content

Commit 49ac38d

Browse files
committed
Fixed Optifine downloader
1 parent 665c53d commit 49ac38d

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "simplelauncher",
3-
"version": "0.3.19",
3+
"version": "0.3.20",
44
"description": "Launcher for SimpleClient",
55
"main": "src/main.js",
66
"scripts": {

src/download/moddownloader.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@ const log = (...data) => console.log('[Mods Download] ' + data)
66

77
const downloadMods = (version, callback) => {
88
const dir = join(getDirectory(), 'versions', version.id, 'mods')
9-
const mods = version.mods.map(mod => [mod, join(dir, mod.split('/')[mod.split('/').length - 1])])
9+
const mods = version.mods.map(mod => {
10+
if (typeof mod === 'string') return [mod, join(dir, mod.split('/')[mod.split('/').length - 1])]
11+
else return [mod.url, join(dir, mod.filename)]
12+
})
1013
downloadFilesAsync(mods, undefined, log, callback)
1114
}
1215

0 commit comments

Comments
 (0)