mirror of
https://github.com/ckaczor/vscode-gitlens.git
synced 2026-01-28 09:35:41 -05:00
Fixes #4 - Absolute paths fail on Windows due to backslash
This commit is contained in:
@@ -11,8 +11,7 @@ function gitCommand(cwd: string, ...args) {
|
||||
|
||||
export default class Git {
|
||||
static normalizePath(fileName: string, repoPath: string) {
|
||||
fileName = fileName.replace(/\\/g, '/');
|
||||
return isAbsolute(fileName) ? relative(repoPath, fileName) : fileName;
|
||||
return (isAbsolute(fileName) ? relative(repoPath, fileName) : fileName).replace(/\\/g, '/');
|
||||
}
|
||||
|
||||
static repoPath(cwd: string) {
|
||||
|
||||
Reference in New Issue
Block a user