microsoft / vscode-remote-release

Visual Studio Code Remote Development: Open any folder in WSL, in a Docker container, or on a remote machine using SSH and take advantage of VS Code's full feature set.
https://aka.ms/vscode-remote
Other
3.67k stars 291 forks source link

Copied path of staged file includes backslashes #9027

Open gavriil-deshaw opened 1 year ago

gavriil-deshaw commented 1 year ago

Type: Bug

Steps to Reproduce:

  1. Open VSCode on Windows, and connect to a Remote host via SSH
  2. Use "Open Folder" for a folder outside of the user's home directory, containing a Git repository
  3. Make some changes to a file and run "git-add"
  4. Once the file is staged, open it in the editor from the Source Control plugin of VSCode
  5. Hover over the editor tab for this file, or do a "Copy Path"

Actual results: The path of the staged file includes backslashes, e.g., \path\to\file

Expected results: The path of the staged file includes "normal" slashed, e.g., /path/to/file

Extension version: 0.106.4 VS Code version: Code 1.82.1 (6509174151d557a81c9d0b5f8a5a1e9274db5585, 2023-09-08T08:45:05.575Z) OS version: Windows_NT x64 10.0.19045 Modes: Remote OS version: Linux x64 4.18.0-477.15.1.el8_8.x86_64

gavriil-deshaw commented 1 year ago

Hi, any updates on this?

gavriil-deshaw commented 1 year ago

Hi @bamurtaugh , any news?

lszomoru commented 9 months ago

@gavriil-deshaw, are you still able to reproduce this issue? Can you reproduce this issue using the WSL extension or it only reproduces when using the SSH extension? Can you reproduce the issue when you open a git repository inside the home directory? If you would share a recording (https://gifcap.dev) that would be really helpful as well. Thanks!

vscodenpa commented 8 months ago

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.

Happy Coding!

gavriil-deshaw commented 8 months ago

@lszomoru yes, I am still facing this issue. I'm not sure about WSL; I think I had tested it when I initially raised this issue and I was seeing the same behavior as with SSH. No, the issue only happens if the repository is outside of the home directory. Although, as you can see from the recordings, even within the home directory I get a different path depending on whether a file is staged or not - not staged gives /u/<username>/..., whereas staged gives ~/....

In home directory: home In /var/tmp (same as with any directory outside of the home dir): var_tmp