File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -252,7 +252,7 @@ class FileWalker {
252252 }
253253
254254 private isExcluded ( path : string ) : boolean {
255- if ( ! this . searchConfig . exclude ) {
255+ if ( this . searchConfig . exclude == null ) {
256256 return false ;
257257 }
258258 return this . searchConfig . exclude . some ( ( ex ) => path . includes ( ex ) ) ;
@@ -275,22 +275,23 @@ class FileWalker {
275275 private processQueue ( ) : void {
276276 while ( this . procs < MAX_PROCS && this . taskQueue . length > 0 ) {
277277 const task = this . taskQueue . shift ( ) ;
278- if ( ! task || ! task . path ) continue ;
278+ if ( ! task ?. path ) {
279+ continue ;
280+ }
279281
280282 switch ( task . operation ) {
281283 case ETaskOperation . explore :
282284 this . run ( task . path ) . catch ( ( error ) => {
283- console . warn ( `Explore task failed for ${ task . path } :` , error ) ;
284285 this . completeTask ( ) ;
285286 } ) ;
286287 break ;
287288 case ETaskOperation . getFolderSize :
288- this . runGetFolderSize ( task . path ) ;
289+ this . runGetFolderSize ( task . path ) . catch ( ( ) => { } ) ;
289290 break ;
290291 case ETaskOperation . getFolderSizeChild :
291- this . runGetFolderSizeChild ( task . path , task . sizeCollector ! ) . catch (
292- ( error ) => {
293- if ( ! task . sizeCollector ) {
292+ this . runGetFolderSizeChild ( task . path , task . sizeCollector ) . catch (
293+ ( ) => {
294+ if ( task . sizeCollector == null ) {
294295 return ;
295296 }
296297
You can’t perform that action at this time.
0 commit comments