Skip to content

Commit

Permalink
Merge pull request #4 from Yanpas/nix
Browse files Browse the repository at this point in the history
unix support
  • Loading branch information
BeauAgst authored Jun 28, 2018
2 parents f45d2f0 + c70a327 commit 78a95e1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
6 changes: 3 additions & 3 deletions blamer.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ const blamer = {

getFiles() {
return new Promise((resolve) => {
fs.readdir(`${blamer.extensionPath}\\img\\`, (err, files) => {
this.files = files;
fs.readdir(`${blamer.extensionPath}/img`, (err, files) => {
this.files = files || [];
resolve();
});
})
Expand All @@ -94,4 +94,4 @@ const blamer = {
},
};

module.exports = blamer;
module.exports = blamer;
4 changes: 2 additions & 2 deletions decoration.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const decoration = {
set(editor, line, revision) {
const path = vscode.extensions.getExtension('beaugust.blamer-vs').extensionPath;
const icon = vscode.window.createTextEditorDecorationType({
gutterIconPath: `${path}\\img\\${revision.image}`,
gutterIconPath: `${path}/img/${revision.image}`,
gutterIconSize: 'contain'
});
this.icons.push(icon);
Expand All @@ -28,4 +28,4 @@ const decoration = {
}
};

module.exports = decoration;
module.exports = decoration;
5 changes: 2 additions & 3 deletions subversion.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ const subversion = {

lines.forEach((line, index) => {
if (line.substring(5, 6) === '-') return;
const pos = line.search(/\d/);
const revision = line.split(' ', 2)[[pos]];
const revision = line.split(' ').filter(s => s)[0];
if (revision) this.revisions[index] = parseInt(revision);
});
},
Expand All @@ -67,4 +66,4 @@ const subversion = {
},
};

module.exports = subversion;
module.exports = subversion;

0 comments on commit 78a95e1

Please sign in to comment.