Browse Source

Fixes matching repo in path mapping for deep link when already open

main
Ramin Tadayon 1 year ago
parent
commit
cc3b2ff7d6
No known key found for this signature in database GPG Key ID: 79D60DDE3DFB95F5
1 changed files with 16 additions and 2 deletions
  1. +16
    -2
      src/uris/deepLinks/deepLinkService.ts

+ 16
- 2
src/uris/deepLinks/deepLinkService.ts View File

@ -478,8 +478,22 @@ export class DeepLinkService implements Disposable {
remoteUrl: remoteUrl,
});
if (matchingLocalRepoPaths.length > 0) {
action = DeepLinkServiceAction.RepoMatchedInLocalMapping;
break;
for (const repo of this.container.git.repositories) {
if (
matchingLocalRepoPaths.some(
p => normalizePath(repo.path.toLowerCase()) === normalizePath(p.toLowerCase()),
)
) {
this._context.repo = repo;
action = DeepLinkServiceAction.RepoMatched;
break;
}
}
if (this._context.repo == null) {
action = DeepLinkServiceAction.RepoMatchedInLocalMapping;
break;
}
}
}

Loading…
Cancel
Save