microsoft / microsoft/vscode-remote-release

Remote-SSH: Folder records with same name but different paths get overwritten

Open
#11,147 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

ssh
Dominant language
Dockerfile
Stars
4.2k
Forks
470
Avg merge
1d 1h
Merged PRs (30d)
1

Description

Is there an existing issue for this bug?
  • I have searched the existing open issues and found none that apply.
  • If I find any issue of interest that is related or closed, I will included a link to it in this issue.
Required Troubleshooting Steps
  • I have read and performed the troubleshooting steps
  • I have tried both values of the remote.SSH.useLocalServer setting
  • My issue was not covered in the Tips and Tricks linked from the Troubleshooting Wiki.
  • I will include a complete copy of my Remote - SSH logs by running Remote-SSH: Show Log in the command palette or from View > Output in the menu bar
[Optional] Diagnose with Copilot

I did not ask the @remote-ssh participant for help

In step 2 of the troubleshooting wiki, what was the result of running the generated SSH command verbatim outside of VS Code?

I did not try step 2 of the troubleshooting steps

Remote-SSH Log
Remote-SSH Log

This issue does not involve SSH connection failures or errors. 
The SSH connection works perfectly fine. This is a UI/storage logic issue 
where folder records with the same name get overwritten in the history, 
regardless of their different paths. 

Logs are not applicable for this type of bug as it's related to 
folder history management rather than SSH operations.

Expected Behavior

When connecting to the same SSH host and opening folders with the same name but different paths, both folder records should be preserved in the connection history. Each unique path should have its own entry.

Actual Behavior

When opening a folder with the same name but different path on the same SSH host, the previous folder record gets overwritten. Only the most recently opened folder path is preserved in the history.

Steps To Reproduce
  1. Connect to SSH host via Remote-SSH extension
  2. Open folder: /home/f14xuanlv/Code
  3. Close VS Code
  4. Reconnect to the same SSH host
  5. Open folder: /media/f14xuanlv/Win11ProW X64/Code
  6. Check the recent folders list - only the second path is shown, the first one disappeared
Anything else?

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the behavior through the Remote-SSH connection flow and inspect how the recent folders list stores entries for one host. Done means opening /home/f14xuanlv/Code and /media/f14xuanlv/Win11ProW X64/Code preserves both paths after reconnecting, rather than replacing the first record.

Written by the indexing model from the issue text.

Assessment

Tech stack
vscode
Domain
desktop, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.