Skip to content

Commit

Permalink
URI decode the workspace path in location.hash
Browse files Browse the repository at this point in the history
Signed-off-by: Rob Moran <[email protected]>
  • Loading branch information
thegecko committed Feb 16, 2019
1 parent 5967a99 commit 2d090d3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/workspace/src/browser/workspace-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ export class WorkspaceService implements FrontendApplicationContribution {
protected getDefaultWorkspacePath(): MaybePromise<string | undefined> {
// Prefer the workspace path specified as the URL fragment, if present.
if (window.location.hash.length > 1) {
// Remove the leading #.
const wpPath = window.location.hash.substring(1);
// Remove the leading # and decode the URI.
const wpPath = decodeURI(window.location.hash.substring(1));
return new URI().withPath(wpPath).withScheme('file').toString();
} else {
// Else, ask the server for its suggested workspace (usually the one
Expand Down

1 comment on commit 2d090d3

@jodeokrae
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@

Please sign in to comment.