File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,8 @@ const EVERYTHING_TYPE = 'all';
3030const ALL_TYPES = [ FILE_TYPE , DIR_TYPE , FILE_DIR_TYPE , EVERYTHING_TYPE ] ;
3131
3232const isNormalFlowError = error => NORMAL_FLOW_ERRORS . has ( error . code ) ;
33+ const [ maj , min ] = process . versions . node . split ( '.' ) . slice ( 0 , 2 ) . map ( n => Number . parseInt ( n , 10 ) ) ;
34+ const wantBigintFsStats = process . platform === 'win32' && ( maj > 10 || ( maj === 10 && min >= 5 ) ) ;
3335
3436const normalizeFilter = filter => {
3537 if ( filter === undefined ) return ;
@@ -92,7 +94,7 @@ class ReaddirpStream extends Readable {
9294
9395 const statMethod = opts . lstat ? lstat : stat ;
9496 // Use bigint stats if it's windows and stat() supports options (node 10+).
95- if ( process . platform === 'win32' && stat . length === 3 ) {
97+ if ( wantBigintFsStats ) {
9698 this . _stat = path => statMethod ( path , { bigint : true } ) ;
9799 } else {
98100 this . _stat = statMethod ;
You can’t perform that action at this time.
0 commit comments