Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] - Status bar can show wrong project when there are two remote projects with the same workspace path #756

Open
hintron opened this issue Aug 19, 2024 · 0 comments
Labels

Comments

@hintron
Copy link

hintron commented Aug 19, 2024

Environment/version

  • Extension version:

    v12.8.0

  • VSCode and OS version:

    Version: 1.92.2 (user setup)
    Commit: fee1edb8d6d72a0ddff41e5f71a671c23ed924b9
    Date: 2024-08-14T17:29:30.058Z
    Electron: 30.1.2
    ElectronBuildId: 9870757
    Chromium: 124.0.6367.243
    Node.js: 20.14.0
    V8: 12.4.254.20-electron.0
    OS: Windows_NT x64 10.0.22631

Steps to reproduce

  1. Save two separate remote projects on separate machines that have the same repo path. Name the first repoX (remote 1) and the second repoX (remote 2).
  2. Open both in new windows. The status bar at the bottom for remote 2 will only show repoX (remote 1).

Looking at the code, I believe the problem is here:

https://github.com/alefragnani/vscode-project-manager/blob/master/src/statusBar.ts#L54

projectStorage.existsRemoteWithRootPath(workspace0) will always return the first remote project with the given workspace path in the projects file, since It does not take into account the current remote.

Instead, it should take into account the remote name as well. It could be something like projectStorage.existsRemoteWithRootPath(remoteName, workspace0) so that the correct project name is returned.

@hintron hintron added the bug label Aug 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant