{"action":"created","issue":{"url":"https://api.github.com/repos/brpaz/vscode-file-templates-ext/issues/2","repository_url":"https://api.github.com/repos/brpaz/vscode-file-templates-ext","labels_url":"https://api.github.com/repos/brpaz/vscode-file-templates-ext/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/brpaz/vscode-file-templates-ext/issues/2/comments","events_url":"https://api.github.com/repos/brpaz/vscode-file-templates-ext/issues/2/events","html_url":"https://github.com/brpaz/vscode-file-templates-ext/issues/2","id":181253922,"number":2,"title":"Use fsPath instead of path when retrieving object paths","user":{"login":"JoBrad","id":847746,"avatar_url":"https://avatars.githubusercontent.com/u/847746?v=3","gravatar_id":"","url":"https://api.github.com/users/JoBrad","html_url":"https://github.com/JoBrad","followers_url":"https://api.github.com/users/JoBrad/followers","following_url":"https://api.github.com/users/JoBrad/following{/other_user}","gists_url":"https://api.github.com/users/JoBrad/gists{/gist_id}","starred_url":"https://api.github.com/users/JoBrad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JoBrad/subscriptions","organizations_url":"https://api.github.com/users/JoBrad/orgs","repos_url":"https://api.github.com/users/JoBrad/repos","events_url":"https://api.github.com/users/JoBrad/events{/privacy}","received_events_url":"https://api.github.com/users/JoBrad/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-10-05T20:13:46Z","updated_at":"2016-10-08T14:28:50Z","closed_at":"2016-10-08T14:28:50Z","body":"In templateFromFileCommand.ts and fileFromTemplateCommand.ts, the path is being set using path. This only works on Linux. It should use fsPath instead, since this value changes based on the OS being used. \r\n\r\nFor additional reference, check out line 104 in the [vscode uri module](https://github.com/Microsoft/vscode/blob/2f76c44632b0d47ba97f66fbc158c763628e30b3/extensions/json/server/src/utils/uri.ts). I have cloned this repo, and can add the updated files, if you like.\r\n\r\n**Line 23 in templateFromFileCommand.ts**\r\n```js\r\n    let filePath = args ? args.fsPath : vscode.window.activeTextEditor.document.fileName;\r\n```\r\n\r\n**Line 23 in fileFromTemplateCommand.ts**\r\n```js\r\n    let targetFolder = args ? args.fsPath : vscode.workspace.rootPath;\r\n```\r\n\r\nEdit: added code and some formatting."},"comment":{"url":"https://api.github.com/repos/brpaz/vscode-file-templates-ext/issues/comments/252427475","html_url":"https://github.com/brpaz/vscode-file-templates-ext/issues/2#issuecomment-252427475","issue_url":"https://api.github.com/repos/brpaz/vscode-file-templates-ext/issues/2","id":252427475,"user":{"login":"brpaz","id":184563,"avatar_url":"https://avatars.githubusercontent.com/u/184563?v=3","gravatar_id":"","url":"https://api.github.com/users/brpaz","html_url":"https://github.com/brpaz","followers_url":"https://api.github.com/users/brpaz/followers","following_url":"https://api.github.com/users/brpaz/following{/other_user}","gists_url":"https://api.github.com/users/brpaz/gists{/gist_id}","starred_url":"https://api.github.com/users/brpaz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brpaz/subscriptions","organizations_url":"https://api.github.com/users/brpaz/orgs","repos_url":"https://api.github.com/users/brpaz/repos","events_url":"https://api.github.com/users/brpaz/events{/privacy}","received_events_url":"https://api.github.com/users/brpaz/received_events","type":"User","site_admin":false},"created_at":"2016-10-08T14:28:50Z","updated_at":"2016-10-08T14:28:50Z","body":"Fixed by PR #5 "}}
{"actor":{"display_login":"brpaz"}}