fix: ensure setupManifest is called for stat functions. (#501)

This commit is contained in:
bruce-one
2018-07-12 23:43:39 +10:00
committed by Caleb Boyd
parent 7768567380
commit 5c4ea55b13
+2
View File
@@ -174,6 +174,7 @@ if (Object.keys(manifest).length) {
return encoding ? result.toString(encoding) : result
},
statSync: function statSync(path: string | Buffer) {
setupManifest()
const stat = ownStat(path)
if (stat) {
return stat
@@ -181,6 +182,7 @@ if (Object.keys(manifest).length) {
return originalStatSync.apply(fs, arguments)
},
stat: function stat(path: string | Buffer, callback: any) {
setupManifest()
const stat = ownStat(path)
if (stat) {
process.nextTick(() => {