Skip to content

Commit

Permalink
v0.9.3: Fix workspace issue on Linux editorconfig#145
Browse files Browse the repository at this point in the history
  • Loading branch information
jednano committed Apr 11, 2017
1 parent acd1582 commit d817060
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 0.9.3
- Fix workspace issue on Linux [`#145`](https://github.com/editorconfig/editorconfig-vscode/issues/145).

## 0.9.2
- Improve/simplify output channel messaging.

Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"displayName": "EditorConfig for VS Code",
"description": "EditorConfig Support for Visual Studio Code",
"publisher": "EditorConfig",
"version": "0.9.2",
"version": "0.9.3",
"icon": "EditorConfig_icon.png",
"engines": {
"vscode": "^1.11.0"
Expand Down Expand Up @@ -39,6 +39,7 @@
},
"dependencies": {
"editorconfig": "^0.13.2",
"lodash.compact": "^3.0.1",
"lodash.get": "^4.4.2"
},
"devDependencies": {
Expand Down
8 changes: 7 additions & 1 deletion src/DocumentWatcher.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import * as editorconfig from 'editorconfig';
import * as compact from 'lodash.compact';
import * as path from 'path';
import {
window,
Expand Down Expand Up @@ -93,7 +94,12 @@ class DocumentWatcher implements EditorConfigProvider {
return doc.fileName;
}
const ext = languageExtensionMap[doc.languageId] || doc.languageId;
return path.join(workspace.rootPath, `${doc.fileName}.${ext}`);
return path.join(
...compact([
workspace.rootPath,
`${doc.fileName}.${ext}`
])
);
}

public getDefaultSettings() {
Expand Down

0 comments on commit d817060

Please sign in to comment.