File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -114,13 +114,13 @@ function isWindowsPath(path: string): boolean {
114114 return / ^ [ a - z A - Z ] : \\ / . test ( path ) ;
115115}
116116
117- export function isDescendant ( parent : string , descendant : string ) : boolean {
117+ export function isDescendant ( parent : string , descendant : string , separator : string = sep ) : boolean {
118118 if ( parent === descendant ) {
119119 return true ;
120120 }
121121
122- if ( parent . charAt ( parent . length - 1 ) !== sep ) {
123- parent += sep ;
122+ if ( parent . charAt ( parent . length - 1 ) !== separator ) {
123+ parent += separator ;
124124 }
125125
126126 // Windows is case insensitive
Original file line number Diff line number Diff line change @@ -1933,7 +1933,7 @@ export class PullRequestModel extends IssueModel<PullRequest> implements IPullRe
19331933
19341934 const allFilenames = filePathOrSubpaths
19351935 . map ( ( f ) =>
1936- isDescendant ( this . githubRepository . rootUri . path , f )
1936+ isDescendant ( this . githubRepository . rootUri . path , f , '/' )
19371937 ? f . substring ( this . githubRepository . rootUri . path . length + 1 )
19381938 : f
19391939 ) ;
You can’t perform that action at this time.
0 commit comments