mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
fix: Remove statSyncNoException for good (#15092)
* fix: Small JS assignment error * fix: Call the right og method * fix: Goodbye, statSyncNoException
This commit is contained in:
committed by
Samuel Attard
parent
5ef5d60f77
commit
d1b2d1a10e
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user