File tree Expand file tree Collapse file tree 1 file changed +1
-2
lines changed Expand file tree Collapse file tree 1 file changed +1
-2
lines changed Original file line number Diff line number Diff line change @@ -552,16 +552,15 @@ export class RepoManager implements IRepoManager {
552552 return ;
553553 }
554554
555+ const files = readdirSync ( this . ctx . indexPath ) ;
555556 const reposToReindex : number [ ] = [ ] ;
556-
557557 for ( const repo of indexedRepos ) {
558558 const shardPrefix = getShardPrefix ( repo . orgId , repo . id ) ;
559559
560560 // TODO: this doesn't take into account if a repo has multiple shards and only some of them are missing. To support that, this logic
561561 // would need to know how many total shards are expected for this repo
562562 let hasShards = false ;
563563 try {
564- const files = readdirSync ( this . ctx . indexPath ) ;
565564 hasShards = files . some ( file => file . startsWith ( shardPrefix ) ) ;
566565 } catch ( error ) {
567566 logger . error ( `Failed to read index directory ${ this . ctx . indexPath } : ${ error } ` ) ;
You can’t perform that action at this time.
0 commit comments