@@ -24,7 +24,6 @@ import { IConfigurationService } from 'vs/platform/configuration/common/configur
24
24
import { IFileService , IFileStatWithPartialMetadata } from 'vs/platform/files/common/files' ;
25
25
import { createDecorator , IInstantiationService } from 'vs/platform/instantiation/common/instantiation' ;
26
26
import { ILabelService } from 'vs/platform/label/common/label' ;
27
- import { ILogService , LogLevel } from 'vs/platform/log/common/log' ;
28
27
import { IProgress , IProgressStep } from 'vs/platform/progress/common/progress' ;
29
28
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry' ;
30
29
import { minimapFindMatch , overviewRulerFindMatchForeground } from 'vs/platform/theme/common/colorRegistry' ;
@@ -853,13 +852,12 @@ export class FolderMatchWorkspaceRoot extends FolderMatchWithResource {
853
852
@IInstantiationService instantiationService : IInstantiationService ,
854
853
@ILabelService labelService : ILabelService ,
855
854
@IUriIdentityService uriIdentityService : IUriIdentityService ,
856
- @ILogService private readonly _logService : ILogService ,
857
855
) {
858
856
super ( _resource , _id , _index , _query , _parent , _searchModel , null , replaceService , instantiationService , labelService , uriIdentityService ) ;
859
857
}
860
858
861
- private uriParent ( uri : URI ) : URI {
862
- return this . uriIdentityService . extUri . dirname ( uri ) ;
859
+ private normalizedUriParent ( uri : URI ) : URI {
860
+ return this . uriIdentityService . extUri . normalizePath ( this . uriIdentityService . extUri . dirname ( uri ) ) ;
863
861
}
864
862
865
863
private uriEquals ( uri1 : URI , ur2 : URI ) : boolean {
@@ -881,24 +879,17 @@ export class FolderMatchWorkspaceRoot extends FolderMatchWithResource {
881
879
}
882
880
883
881
const fileMatchParentParts : URI [ ] = [ ] ;
884
- let uri = this . uriParent ( rawFileMatch . resource ) ;
882
+ const normalizedResource = this . uriIdentityService . extUri . normalizePath ( this . resource ) ;
883
+ let uri = this . normalizedUriParent ( rawFileMatch . resource ) ;
885
884
886
- const debug : string [ ] = [ '[search model building]' ] ;
887
- while ( ! this . uriEquals ( this . resource , uri ) ) {
885
+ while ( ! this . uriEquals ( normalizedResource , uri ) ) {
888
886
fileMatchParentParts . unshift ( uri ) ;
889
887
const prevUri = uri ;
890
- uri = this . uriParent ( uri ) ;
891
- if ( this . _logService . getLevel ( ) === LogLevel . Trace ) {
892
- debug . push ( `current uri parent ${ uri } comparing with ${ prevUri } ` ) ;
893
- }
888
+ uri = this . normalizedUriParent ( uri ) ;
894
889
if ( this . uriEquals ( prevUri , uri ) ) {
895
- this . _logService . trace ( debug . join ( '\n\n' ) ) ;
896
- throw Error ( `${ rawFileMatch . resource } is not correctly configured as a child of its ${ this . resource } ` ) ;
890
+ throw Error ( `${ rawFileMatch . resource } is not correctly configured as a child of its ${ normalizedResource } ` ) ;
897
891
}
898
892
}
899
- if ( this . _logService . getLevel ( ) === LogLevel . Trace ) {
900
- this . _logService . trace ( debug . join ( '\n\n' ) ) ;
901
- }
902
893
903
894
const root = this . closestRoot ?? this ;
904
895
let parent : FolderMatch = this ;
0 commit comments