Skip to content

Commit 42ce30d

Browse files
committed
Fix incorrect path parsing of incoming URI
- Was not using the correct split function. - Cannot use fsPath since on Windows that results in \ rather than /.
1 parent 80ebf63 commit 42ce30d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/extension.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
handleInspectCommand,
1111
handleShowLogsCommand,
1212
} from "./logs"
13-
import { context, debug, getQueryValue } from "./utils"
13+
import { context, debug, getQueryValue, split } from "./utils"
1414
import {
1515
CoderWorkspacesProvider,
1616
rebuildWorkspace,
@@ -28,7 +28,7 @@ export const uriHandler: vscode.UriHandler = {
2828
// split on the first non-leading trailing slash which separates the
2929
// action from the resource. The action is not allowed to contain slashes
3030
// but the resource can.
31-
const [action, resource] = uri.fsPath.replace(/^\//, "").split("/")
31+
const [action, resource] = split(uri.path.replace(/^\//, ""), "/")
3232
if (!action || !resource) {
3333
vscode.window.showErrorMessage(`URI is malformed: "${uri}"`)
3434
return

0 commit comments

Comments
 (0)