From d30887651f00ebc4ef03691eb34ba454b11db9e7 Mon Sep 17 00:00:00 2001 From: fofolee Date: Fri, 3 May 2019 20:35:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B9=E4=BE=BF=E8=B0=83=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- node_modules/icon-extractor/win-iconExtractor.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/node_modules/icon-extractor/win-iconExtractor.js b/node_modules/icon-extractor/win-iconExtractor.js index 3cf4231..fc9b178 100644 --- a/node_modules/icon-extractor/win-iconExtractor.js +++ b/node_modules/icon-extractor/win-iconExtractor.js @@ -57,8 +57,11 @@ function IconExtractor(){ function getPlatformIconProcess(){ if (os.type() == 'Windows_NT') { - // return path.join(__dirname, 'bin', 'IconExtractor.exe'); - return path.join(__dirname.replace(/(unsafe-\w+\.asar)/,'$1.unpacked'), 'bin', 'IconExtractor.exe') + if (/(unsafe-\w+\.asar)/.test(__dirname)) { + return path.join(__dirname.replace(/(unsafe-\w+\.asar)/,'$1.unpacked'), 'bin', 'IconExtractor.exe') + } else { + return path.join(__dirname, 'bin', 'IconExtractor.exe'); + } //Do stuff here to get the icon that doesn't have the shortcut thing on it } else { throw('This platform (' + os.type() + ') is unsupported =(');