Преглед изворни кода

Fixes diff w/ working on virtual repos

Refs: #2300
main
Eric Amodio пре 2 година
родитељ
комит
e9051db241
3 измењених фајлова са 9 додато и 6 уклоњено
  1. +3
    -2
      src/env/node/git/localGitProvider.ts
  2. +3
    -2
      src/git/gitProviderService.ts
  3. +3
    -2
      src/plus/github/githubGitProvider.ts

+ 3
- 2
src/env/node/git/localGitProvider.ts Прегледај датотеку

@ -694,8 +694,9 @@ export class LocalGitProvider implements GitProvider, Disposable {
}
// Short-circuit if the path is relative
if (typeof pathOrUri === 'string' && !isAbsolute(pathOrUri)) {
return Uri.joinPath(base, normalizePath(pathOrUri));
if (typeof pathOrUri === 'string') {
const normalized = normalizePath(pathOrUri);
if (!isAbsolute(normalized)) return Uri.joinPath(base, normalized);
}
const relativePath = this.getRelativePath(pathOrUri, base);

+ 3
- 2
src/git/gitProviderService.ts Прегледај датотеку

@ -856,8 +856,9 @@ export class GitProviderService implements Disposable {
}
// Short-circuit if the base is already a Uri and the path is relative
if (typeof base !== 'string' && typeof pathOrUri === 'string' && !isAbsolute(pathOrUri)) {
return Uri.joinPath(base, normalizePath(pathOrUri));
if (typeof base !== 'string' && typeof pathOrUri === 'string') {
const normalized = normalizePath(pathOrUri);
if (!isAbsolute(normalized)) return Uri.joinPath(base, normalized);
}
const { provider } = this.getProvider(base);

+ 3
- 2
src/plus/github/githubGitProvider.ts Прегледај датотеку

@ -281,8 +281,9 @@ export class GitHubGitProvider implements GitProvider, Disposable {
}
}
if (typeof pathOrUri === 'string' && !maybeUri(pathOrUri) && !isAbsolute(pathOrUri)) {
return Uri.joinPath(base, normalizePath(pathOrUri));
if (typeof pathOrUri === 'string' && !maybeUri(pathOrUri)) {
const normalized = normalizePath(pathOrUri);
if (!isAbsolute(normalized)) return Uri.joinPath(base, normalized);
}
const relativePath = this.getRelativePath(pathOrUri, base);

||||||
x
 
000:0
Loading…
Откажи
Сачувај