Skip to content

Commit 23b7e1c

Browse files
committed
Revert eclipse-theia#15331 to fix webviews
Fixes eclipse-theia#15416 Contributed on behalf of STMicroelectronics Signed-off-by: Thomas Mäder <t.s.maeder@gmail.com>
1 parent b7b06f0 commit 23b7e1c

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

packages/core/src/common/path.spec.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -271,10 +271,6 @@ describe('Path', () => {
271271
});
272272
});
273273

274-
it('Should not produce joined paths with double initial //', () => {
275-
expect(new Path('/').join('/something/absolute').toString()).eq('/something/absolute');
276-
});
277-
278274
const linuxHome = '/home/test-user';
279275
const windowsHome = '/C:/Users/test-user';
280276

packages/core/src/common/path.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,10 @@ export class Path {
215215
if (!relativePath) {
216216
return this;
217217
}
218-
return new Path(this.raw + Path.separator + relativePath).normalize();
218+
if (this.raw.endsWith(Path.separator)) {
219+
return new Path(this.raw + relativePath);
220+
}
221+
return new Path(this.raw + Path.separator + relativePath);
219222
}
220223

221224
/**

0 commit comments

Comments
 (0)