File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -531,15 +531,16 @@ export class NodeFsHandler {
531531 directory : string ,
532532 initialAdd : boolean ,
533533 wh : WatchHelper ,
534- target : Path ,
534+ target : Path | undefined ,
535535 dir : Path ,
536536 depth : number ,
537537 throttler : Throttler
538538 ) : Promise < unknown > | undefined {
539539 // Normalize the directory name on Windows
540540 directory = sp . join ( directory , '' ) ;
541541
542- throttler = this . fsw . _throttle ( 'readdir' , directory , 1000 ) as Throttler ;
542+ const throttleKey = target ? `${ directory } :${ target } ` : directory ;
543+ throttler = this . fsw . _throttle ( 'readdir' , throttleKey , 1000 ) as Throttler ;
543544 if ( ! throttler ) return ;
544545
545546 const previous = this . fsw . _getWatchedDir ( wh . path ) ;
@@ -632,7 +633,7 @@ export class NodeFsHandler {
632633 stats : Stats ,
633634 initialAdd : boolean ,
634635 depth : number ,
635- target : string ,
636+ target : string | undefined ,
636637 wh : WatchHelper ,
637638 realpath : string
638639 ) : Promise < ( ( ) => void ) | undefined > {
@@ -713,7 +714,7 @@ export class NodeFsHandler {
713714 stats ,
714715 initialAdd ,
715716 depth ,
716- target ! ,
717+ target ,
717718 wh ,
718719 targetPath
719720 ) ;
You can’t perform that action at this time.
0 commit comments