Skip to content

Commit

Permalink
Merge pull request #3 from aodag/fix-creating-license-file-on-windows
Browse files Browse the repository at this point in the history
Fix creating license file on windows
  • Loading branch information
ymotongpoo committed May 2, 2016
2 parents 60f198e + 252511c commit 6ff9923
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/extension.ts
Expand Up @@ -113,7 +113,7 @@ class Licenser {
}
let license = this.getLicense(this.licenseType);

let uri = vscode.Uri.parse('untitled:' + root + '/' + defaultLicenseFilename);
let uri = vscode.Uri.parse('untitled:' + root + path.sep + defaultLicenseFilename);
vscode.workspace.openTextDocument(uri).then((doc) => {
vscode.window.showTextDocument(doc).then((editor) => {
editor.edit((ed) => {
Expand All @@ -124,8 +124,14 @@ class Licenser {
vscode.window.showInformationMessage(`Successfully saved: ${uri}`);
})
}
}, (reason) => {
console.log(reason);
vscode.window.showErrorMessage(reason);
})
})
}, (reason) => {
console.log(reason);
vscode.window.showErrorMessage(reason);
});
}

Expand Down

0 comments on commit 6ff9923

Please sign in to comment.