Skip to content

Commit bd4cb40

Browse files
committed
explorer model: rtrim a bit less
1 parent 8010415 commit bd4cb40

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/vs/workbench/parts/files/common/explorerModel.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -338,14 +338,14 @@ export class ExplorerItem {
338338
if (resource && this.resource.scheme === resource.scheme && this.resource.authority === resource.authority &&
339339
(isLinux ? startsWith(resource.path, this.resource.path) : startsWithIgnoreCase(resource.path, this.resource.path))
340340
) {
341-
return this.findByPath(resource.path, this.resource.path.length);
341+
return this.findByPath(rtrim(resource.path, paths.nativeSep), this.resource.path.length);
342342
}
343343

344344
return null; //Unable to find
345345
}
346346

347347
private findByPath(path: string, index: number): ExplorerItem {
348-
if (paths.isEqual(rtrim(this.resource.path, paths.sep), rtrim(path, paths.sep), !isLinux)) {
348+
if (paths.isEqual(rtrim(this.resource.path, paths.sep), path, !isLinux)) {
349349
return this;
350350
}
351351

0 commit comments

Comments
 (0)