Skip to content

Commit b693ea5

Browse files
authored
Fix mark file as viewed from editor toolbar and keybinding (#6021)
Fixes #6012
1 parent 16913bb commit b693ea5

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/common/utils.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,13 +114,13 @@ function isWindowsPath(path: string): boolean {
114114
return /^[a-zA-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

src/github/pullRequestModel.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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
);

0 commit comments

Comments
 (0)