Vscode: "Reveal In Side Bar" does not work if the file is opened from external apps

Created on 8 Nov 2020  路  7Comments  路  Source: microsoft/vscode




  • VSCode Version: 1.51.0
  • OS Version: Windows 10 19042

Steps to Reproduce:

  1. Open a folder
  2. Open a file inside the folder, via File Explorer or via GitHub Desktop
  3. See the "Open editors" list shows a full path instead of a relative path
  4. Try "Reveal In Side Bar"

image


Does this issue occur when all extensions are disabled?: Yes

I think this is a regression in 1.51.

bug candidate regression uri verified

Most helpful comment

For users coming to this issue to find more details: we will ship a fix for this issue in vscode stable this or next week.
If you are interested in how we fixed it you can checkout this PR https://github.com/microsoft/vscode/pull/110247

All 7 comments

I can reproduce this only on Windows. On macOS things seems to work just fine.
The issue seems to be that this check here fails.
So the contextService.isInsideWorkspace wrongly returns false here.

I believe the issue is with the uri when it comes into VS Code via the Open With command, it has the following structure. Notice the leading upper case C. And I believe all URI internally have the lower case driver letter.

So the gist is: "Open With" command should normalize drive letters when feeding uri's into VS Code.

Also assigning to @bpasero and @sandy081 for ideas

Assigning candidate label since it is a regression. Not sure if we should ship as part of recovery but for discussion.

Screenshot 2020-11-09 at 11 36 05

Yeah - likely because the uri search tree is not doing implicit normalisations anymore. I'd say the workspace service or workspace-object should make sure to use a canonical uri before looking something up. Not sure this is a candidate tho.

I am perfectly fine with not doing this is a candidate. Just added label for awarness.

For users coming to this issue to find more details: we will ship a fix for this issue in vscode stable this or next week.
If you are interested in how we fixed it you can checkout this PR https://github.com/microsoft/vscode/pull/110247

merged my PR and cherry-picked the change to master. Also, driving the adoption of the better way of doing this: https://github.com/microsoft/vscode/issues/110241

Was this page helpful?
0 / 5 - 0 ratings

Related issues

borekb picture borekb  路  3Comments

biij5698 picture biij5698  路  3Comments

villiv picture villiv  路  3Comments

vsccarl picture vsccarl  路  3Comments

omidgolparvar picture omidgolparvar  路  3Comments