Fixes issues with paths on Windows

This commit is contained in:
Eric Amodio
2017-03-22 00:50:06 -04:00
parent 97f88489a4
commit 4e3ccd9581
9 changed files with 35 additions and 33 deletions

View File

@@ -188,7 +188,7 @@ export class GitLogParser {
let recentCommit: GitLogCommit;
if (isRepoPath) {
repoPath = fileNameOrRepoPath;
repoPath = Git.normalizePath(fileNameOrRepoPath);
}
for (let i = 0, len = entries.length; i < len; i++) {
@@ -203,7 +203,7 @@ export class GitLogParser {
}
else {
// Try to get the repoPath from the most recent commit
repoPath = fileNameOrRepoPath.replace(fileNameOrRepoPath.startsWith('/') ? `/${entry.fileName}` : entry.fileName, '');
repoPath = Git.normalizePath(fileNameOrRepoPath.replace(fileNameOrRepoPath.startsWith('/') ? `/${entry.fileName}` : entry.fileName, ''));
relativeFileName = path.relative(repoPath, fileNameOrRepoPath).replace(/\\/g, '/');
}
}