diff --git a/lib/util/index.js b/lib/util/index.js index c27070e..69dec00 100644 --- a/lib/util/index.js +++ b/lib/util/index.js @@ -1,5 +1,5 @@ const { - statSync, + lstatSync, existsSync, openSync, readSync, @@ -43,7 +43,7 @@ function splitPath (archivePath) { if (isAsarDisabled()) return r if (typeof archivePath !== 'string') return r if (archivePath.endsWith('.asar')) { - if (existsSync(archivePath) && statSync(archivePath).isFile()) { + if (existsSync(archivePath) && lstatSync(archivePath).isFile()) { r.isAsar = true r.asarPath = tryRedirectUnpacked(archivePath) r.filePath = '' @@ -57,7 +57,7 @@ function splitPath (archivePath) { const archive = archivePath.substring(0, index + 5) - if (existsSync(archive) && statSync(archive).isFile()) { + if (existsSync(archive) && lstatSync(archive).isFile()) { r.isAsar = true r.asarPath = tryRedirectUnpacked(archive) r.filePath = archivePath.substring(index + 6)