@@ -742,7 +742,7 @@ export const wrapFsWithAsar = (fs: Record<string, any>) => {
742742 }
743743
744744 const dirent = getDirent ( currentPath , result [ 0 ] [ i ] , type ) ;
745- const stat = internalBinding ( 'fs' ) . internalModuleStat ( binding , resultPath ) ;
745+ const stat = internalBinding ( 'fs' ) . internalModuleStat ( resultPath ) ;
746746
747747 context . readdirResults . push ( dirent ) ;
748748 if ( dirent . isDirectory ( ) || stat === 1 ) {
@@ -755,7 +755,7 @@ export const wrapFsWithAsar = (fs: Record<string, any>) => {
755755 for ( let i = 0 ; i < result . length ; i ++ ) {
756756 const resultPath = path . join ( currentPath , result [ i ] ) ;
757757 const relativeResultPath = path . relative ( context . basePath , resultPath ) ;
758- const stat = internalBinding ( 'fs' ) . internalModuleStat ( binding , resultPath ) ;
758+ const stat = internalBinding ( 'fs' ) . internalModuleStat ( resultPath ) ;
759759 context . readdirResults . push ( relativeResultPath ) ;
760760
761761 if ( stat === 1 ) {
@@ -825,7 +825,7 @@ export const wrapFsWithAsar = (fs: Record<string, any>) => {
825825 if ( context . withFileTypes ) {
826826 readdirResult = [
827827 [ ...readdirResult ] , readdirResult . map ( ( p : string ) => {
828- return internalBinding ( 'fs' ) . internalModuleStat ( binding , path . join ( pathArg , p ) ) ;
828+ return internalBinding ( 'fs' ) . internalModuleStat ( path . join ( pathArg , p ) ) ;
829829 } )
830830 ] ;
831831 }
@@ -1010,9 +1010,9 @@ export const wrapFsWithAsar = (fs: Record<string, any>) => {
10101010 } ) ;
10111011
10121012 const { internalModuleStat } = binding ;
1013- internalBinding ( 'fs' ) . internalModuleStat = ( receiver : unknown , pathArgument : string ) => {
1013+ internalBinding ( 'fs' ) . internalModuleStat = ( pathArgument : string ) => {
10141014 const pathInfo = splitPath ( pathArgument ) ;
1015- if ( ! pathInfo . isAsar ) return internalModuleStat ( receiver , pathArgument ) ;
1015+ if ( ! pathInfo . isAsar ) return internalModuleStat ( pathArgument ) ;
10161016 const { asarPath, filePath } = pathInfo ;
10171017
10181018 // -ENOENT
@@ -1047,7 +1047,7 @@ export const wrapFsWithAsar = (fs: Record<string, any>) => {
10471047 if ( withFileTypes ) {
10481048 initialItem = [
10491049 [ ...initialItem ] , initialItem . map ( ( p : string ) => {
1050- return internalBinding ( 'fs' ) . internalModuleStat ( binding , path . join ( originalPath , p ) ) ;
1050+ return internalBinding ( 'fs' ) . internalModuleStat ( path . join ( originalPath , p ) ) ;
10511051 } )
10521052 ] ;
10531053 }
@@ -1080,7 +1080,7 @@ export const wrapFsWithAsar = (fs: Record<string, any>) => {
10801080
10811081 readdirResult = [
10821082 [ ...files ] , files . map ( ( p : string ) => {
1083- return internalBinding ( 'fs' ) . internalModuleStat ( binding , path . join ( direntPath , p ) ) ;
1083+ return internalBinding ( 'fs' ) . internalModuleStat ( path . join ( direntPath , p ) ) ;
10841084 } )
10851085 ] ;
10861086 } else {
@@ -1101,7 +1101,7 @@ export const wrapFsWithAsar = (fs: Record<string, any>) => {
11011101 const { 0 : pathArg , 1 : readDir } = queue . pop ( ) ;
11021102 for ( const ent of readDir ) {
11031103 const direntPath = path . join ( pathArg , ent ) ;
1104- const stat = internalBinding ( 'fs' ) . internalModuleStat ( binding , direntPath ) ;
1104+ const stat = internalBinding ( 'fs' ) . internalModuleStat ( direntPath ) ;
11051105 result . push ( path . relative ( originalPath , direntPath ) ) ;
11061106
11071107 if ( stat === 1 ) {
@@ -1155,7 +1155,7 @@ export const wrapFsWithAsar = (fs: Record<string, any>) => {
11551155 if ( context . withFileTypes ) {
11561156 readdirResult = [
11571157 [ ...readdirResult ] , readdirResult . map ( ( p : string ) => {
1158- return internalBinding ( 'fs' ) . internalModuleStat ( binding , path . join ( pathArg , p ) ) ;
1158+ return internalBinding ( 'fs' ) . internalModuleStat ( path . join ( pathArg , p ) ) ;
11591159 } )
11601160 ] ;
11611161 }
0 commit comments