Skip to content

Commit 576e3de

Browse files
Complete the lstat patching for aspnet#1101
1 parent 44f86eb commit 576e3de

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

‎src/Microsoft.AspNetCore.NodeServices/Content/Node/entrypoint-http.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@
149149
varpath=__webpack_require__(3);
150150
varstartsWith=function(str,prefix){returnstr.substring(0,prefix.length)===prefix;};
151151
varappRootDir=process.cwd();
152-
functionpatchedLStat(pathToStatLong){
152+
functionpatchedLStat(pathToStatLong,fsReqWrap){
153153
try{
154154
// If the lstat completes without errors, we don't modify its behavior at all
155155
returnorigLStat.apply(this,arguments);
@@ -165,7 +165,7 @@
165165
// ancestor directories are symlinks or not. If there's a genuine file
166166
// permissions issue, it will still surface later when Node actually
167167
// tries to read the file.
168-
returnorigLStat.call(this,appRootDir);
168+
returnorigLStat.call(this,appRootDir,fsReqWrap);
169169
}
170170
else{
171171
// In any other case, preserve the original error

‎src/Microsoft.AspNetCore.NodeServices/TypeScript/Util/PatchModuleResolutionLStat.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import * as path from 'path'
22
conststartsWith=(str: string,prefix: string)=>str.substring(0,prefix.length)===prefix;
33
constappRootDir=process.cwd();
44

5-
functionpatchedLStat(pathToStatLong: string){
5+
functionpatchedLStat(pathToStatLong: string,fsReqWrap?: any){
66
try{
77
// If the lstat completes without errors, we don't modify its behavior at all
88
returnorigLStat.apply(this,arguments);
@@ -19,7 +19,7 @@ function patchedLStat(pathToStatLong: string){
1919
// ancestor directories are symlinks or not. If there's a genuine file
2020
// permissions issue, it will still surface later when Node actually
2121
// tries to read the file.
22-
returnorigLStat.call(this,appRootDir);
22+
returnorigLStat.call(this,appRootDir,fsReqWrap);
2323
}else{
2424
// In any other case, preserve the original error
2525
throwex;

0 commit comments

Comments
(0)