lstatSync and readdirSync is not needed by require

This commit is contained in:
Cheng Zhao 2015-03-30 19:27:15 +08:00
Родитель 0bbe4063cf
Коммит 49f5e3099f
1 изменённых файлов: 0 добавлений и 10 удалений

Просмотреть файл

@ -64,9 +64,6 @@ fs.statSync = (p) ->
return statSync.apply this, arguments unless isAsar
asarStatsToFsStats asar.statFile(asarPath, filePath)
# lstatSync is not implemented yet.
fs.lstatSync = fs.statSync
realpathSync = fs.realpathSync
fs.realpathSync = (p) ->
[isAsar, asarPath, filePath] = splitPath p
@ -74,10 +71,3 @@ fs.realpathSync = (p) ->
stat = asar.statFile(asarPath, filePath)
filePath = stat.link if stat.link
path.join realpathSync(asarPath), filePath
readdirSync = fs.readdirSync
fs.readdirSync = (p) ->
[isAsar, asarPath, filePath] = splitPath p
return readdirSync.apply this, arguments unless isAsar
stat = asar.statFile(asarPath, filePath, true)
file for file,_ of stat.files