Skip to content

Commit

Permalink
Use uris instead of file paths.
Browse files Browse the repository at this point in the history
  • Loading branch information
hediet committed Jun 20, 2021
1 parent 5a6340a commit 6198399
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
12 changes: 5 additions & 7 deletions src/DrawioClient/DrawioClientFactory.ts
Expand Up @@ -13,7 +13,7 @@ export class DrawioClientFactory {
constructor(
private readonly config: Config,
private readonly log: OutputChannel,
private readonly extensionPath: string
private readonly extensionUri: Uri
) {}

public async createDrawioClientInWebview(
Expand Down Expand Up @@ -193,15 +193,13 @@ export class DrawioClientFactory {
plugins: { jsCode: string }[]
): string {
const vsuri = webview.asWebviewUri(
Uri.file(path.join(this.extensionPath, "drawio/src/main/webapp"))
Uri.joinPath(this.extensionUri, "drawio/src/main/webapp")
);
const customPluginsPath = webview.asWebviewUri(
// See webpack configuration.
Uri.file(
path.join(
this.extensionPath,
"dist/custom-drawio-plugins/index.js"
)
Uri.joinPath(
this.extensionUri,
"dist/custom-drawio-plugins/index.js"
)
);

Expand Down
2 changes: 1 addition & 1 deletion src/Extension.ts
Expand Up @@ -29,7 +29,7 @@ export class Extension {
private readonly drawioClientFactory = new DrawioClientFactory(
this.config,
this.log,
this.context.extensionPath
this.context.extensionUri
);
private readonly editorService = new DrawioEditorService(
this.config,
Expand Down

0 comments on commit 6198399

Please sign in to comment.