Changes GitUri to have the full path (like normal Uris)

This commit is contained in:
Eric Amodio
2017-03-12 01:12:49 -05:00
parent b40ad7eced
commit 89a2471736
2 changed files with 5 additions and 11 deletions

View File

@@ -96,11 +96,11 @@ export class GitCommit implements IGitCommit {
}
get previousUri(): Uri {
return this.previousFileName ? Uri.file(path.join(this.repoPath, this.previousFileName)) : this.uri;
return this.previousFileName ? Uri.file(path.resolve(this.repoPath, this.previousFileName)) : this.uri;
}
get uri(): Uri {
return Uri.file(path.join(this.repoPath, this.originalFileName || this.fileName));
return Uri.file(path.resolve(this.repoPath, this.originalFileName || this.fileName));
}
getFormattedPath(separator: string = ' \u00a0\u2022\u00a0 '): string {
@@ -155,7 +155,7 @@ export class GitLogCommit extends GitCommit {
}
get nextUri(): Uri {
return this.nextFileName ? Uri.file(path.join(this.repoPath, this.nextFileName)) : this.uri;
return this.nextFileName ? Uri.file(path.resolve(this.repoPath, this.nextFileName)) : this.uri;
}
}