Skip to content

Commit

Permalink
Windows fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
stefan-ka committed Jun 4, 2020
1 parent a8423ac commit ad95b1b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .vscodeignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.gitignore
.gradle/**
build/**
*.gradle

4 changes: 2 additions & 2 deletions src/commands/generators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ export function generateContextMap(): CommandType {
await generateFunction();

// preview png if it was generated
var inputFileName = currentDocument.uri.toString().substring(currentDocument.uri.toString().lastIndexOf(path.sep) + 1, currentDocument.uri.toString().length - 4);
var inputFileName = currentDocument.uri.toString().substring(currentDocument.uri.toString().lastIndexOf("/") + 1, currentDocument.uri.toString().length - 4);
var pngUri = Uri.file(workspace.rootPath + "/src-gen/" + inputFileName + "_ContextMap.png");
if (fs.existsSync(pngUri.toString().replace("file://", "")))
if (fs.existsSync(pngUri.fsPath))
await commands.executeCommand('vscode.open', pngUri, { viewColumn: ViewColumn.Two });
}
};
Expand Down

0 comments on commit ad95b1b

Please sign in to comment.