Browse Source

fix: Remove `statSyncNoException` for good (backport: 4-0-x) (#15110)

* fix: Small JS assignment error

* fix: Call the right og method

* fix: Goodbye, statSyncNoException
trop[bot] 6 years ago
parent
commit
8094f1a3f0
1 changed files with 0 additions and 14 deletions
  1. 0 14
      lib/common/asar.js

+ 0 - 14
lib/common/asar.js

@@ -292,20 +292,6 @@
       process.nextTick(() => fs.lstat(pathArgument, callback))
     }
 
-    const { statSyncNoException } = fs
-    fs.statSyncNoException = pathArgument => {
-      const { isAsar, asarPath, filePath } = splitPath(pathArgument)
-      if (!isAsar) return statSyncNoException(pathArgument)
-
-      const archive = getOrCreateArchive(asarPath)
-      if (!archive) return false
-
-      const stats = archive.stat(filePath)
-      if (!stats) return false
-
-      return asarStatsToFsStats(stats)
-    }
-
     const { realpathSync } = fs
     fs.realpathSync = function (pathArgument) {
       const { isAsar, asarPath, filePath } = splitPath(pathArgument)