From 03273232c6e224955a106aac8bcd448b5b21c9ca Mon Sep 17 00:00:00 2001 From: Daniel Scalzi Date: Sun, 18 Nov 2018 04:19:17 -0500 Subject: [PATCH] Fix for native lib parsing in old MC versions. Fixes #18. --- app/assets/js/assetguard.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/js/assetguard.js b/app/assets/js/assetguard.js index 879e0c1b9e..7806811d8c 100644 --- a/app/assets/js/assetguard.js +++ b/app/assets/js/assetguard.js @@ -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)