File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -495,11 +495,14 @@ namespace ts {
495495 visitDirectory ( path ) ;
496496 return result ;
497497 function visitDirectory ( path : string ) {
498- // This filtering is necessary because on some file system node fails to exclude
499- // "." and "..". See https://github.com/nodejs/node/issues/4002
500- const files = filter ( < string [ ] > _fs . readdirSync ( path || "." ) , f => f !== "." && f !== ".." ) . sort ( ) ;
498+ const files = _fs . readdirSync ( path || "." ) . sort ( ) ;
501499 const directories : string [ ] = [ ] ;
502500 for ( const current of files ) {
501+ // This is necessary because on some file system node fails to exclude
502+ // "." and "..". See https://github.com/nodejs/node/issues/4002
503+ if ( current === "." || current === ".." ) {
504+ continue ;
505+ }
503506 const name = combinePaths ( path , current ) ;
504507 if ( ! contains ( exclude , getCanonicalPath ( name ) ) ) {
505508 const stat = _fs . statSync ( name ) ;
You can’t perform that action at this time.
0 commit comments