Skip to content

Commit

Permalink
[VS Code] Fix URI comparison on Windows (#63)
Browse files Browse the repository at this point in the history
  • Loading branch information
msujew authored Sep 1, 2024
1 parent 9b822d1 commit 93afb98
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 7 deletions.
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 11 additions & 1 deletion packages/open-collaboration-vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "open-collaboration-tools",
"displayName": "Open Collaboration Tools",
"description": "Connect with others and live-share your code in real-time collaboration sessions",
"version": "0.2.1",
"version": "0.2.2",
"publisher": "typefox",
"categories": [
"Other"
Expand Down Expand Up @@ -50,6 +50,16 @@
}
},
"contributes": {
"resourceLabelFormatters": [
{
"scheme": "oct",
"formatting": {
"label": "${path}",
"separator": "/",
"workspaceSuffix": "Open Collaboration Tools"
}
}
],
"configuration": {
"title": "Open Collaboration Tools",
"properties": {
Expand Down
4 changes: 2 additions & 2 deletions packages/open-collaboration-vscode/src/utils/uri.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ export namespace CollaborationUri {
if (!uri) {
return undefined;
}
const path = uri.path.toString();
const path = uri.toString();
const roots = (vscode.workspace.workspaceFolders ?? []);
for (const root of roots) {
const rootUri = root.uri.path + '/';
const rootUri = root.uri.toString() + '/';
if (path.startsWith(rootUri)) {
return root.name + '/' + path.substring(rootUri.length);
}
Expand Down

0 comments on commit 93afb98

Please sign in to comment.