Skip to content

Commit

Permalink
Fix for native lib parsing in old MC versions.
Browse files Browse the repository at this point in the history
Fixes #18.
  • Loading branch information
dscalzi committed Nov 18, 2018
1 parent 37d35a6 commit 0327323
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/assets/js/assetguard.js
Original file line number Diff line number Diff line change
Expand Up @@ -1162,7 +1162,7 @@ class AssetGuard extends EventEmitter {
//Check validity of each library. If the hashs don't match, download the library.
async.eachLimit(libArr, 5, (lib, cb) => {
if(Library.validateRules(lib.rules)){
let artifact = (lib.natives == null) ? lib.downloads.artifact : lib.downloads.classifiers[lib.natives[Library.mojangFriendlyOS()]]
let artifact = (lib.natives == null) ? lib.downloads.artifact : lib.downloads.classifiers[lib.natives[Library.mojangFriendlyOS()].replace('${arch}', process.arch.replace('x', ''))]
const libItm = new Library(lib.name, artifact.sha1, artifact.size, artifact.url, path.join(libPath, artifact.path))
if(!AssetGuard._validateLocal(libItm.to, 'sha1', libItm.hash)){
dlSize += (libItm.size*1)
Expand Down

0 comments on commit 0327323

Please sign in to comment.