Skip to content

Handle UNC paths correctly in bootstrap.js - #66128

Merged
Benjamin Pasero (bpasero) merged 1 commit into
microsoft:masterfrom
the-ress:issue-53857
Jan 7, 2019
Merged

Handle UNC paths correctly in bootstrap.js#66128
Benjamin Pasero (bpasero) merged 1 commit into
microsoft:masterfrom
the-ress:issue-53857

Conversation

@the-ress

Copy link
Copy Markdown
Contributor

uriFromPath now converts \\computer\share\path into file://computer/share/path instead of incorrect file:////computer/share/path

Fixes #53857

@bpasero

Copy link
Copy Markdown
Contributor

Tereza Tomcova (@the-ress) thanks, this actually seems to fix not being able to launch VSCode from a UNC path in general (not just portable).

@bpasero
Benjamin Pasero (bpasero) merged commit e9d6a65 into microsoft:master Jan 7, 2019
@the-ress
Tereza Tomcova (the-ress) deleted the issue-53857 branch January 7, 2019 12:07
@fbehrens

fkbs (fbehrens) commented Jan 14, 2019

Copy link
Copy Markdown

Benjamin Pasero (@bpasero) I have checked, and found that code-insiders (2ab82c12ed809fd1df921d016eed344a18a9ee8f from 2019-01-14T06:18:47.017Z`) could not be launced from an UNC path.

$ code-insiders 
'\\server\c$\Scripts'
CMD.EXE was started with the above path as the current directory.
UNC paths are not supported.  Defaulting to Windows directory.

@bpasero

Copy link
Copy Markdown
Contributor

fkbs (@fbehrens) when I tried it worked for me, I used a localhost UNC path (see https://stackoverflow.com/questions/2787203/unc-path-to-a-folder-on-my-local-computer), opened it in Windows explorer, copied Code over and tried to start it. This works after this change but not before this change.

@the-ress

Tereza Tomcova (the-ress) commented Jan 14, 2019

Copy link
Copy Markdown
Contributor Author

fkbs (@fbehrens) you should be able to launch Code - Insiders.exe directly. code-insiders.cmd can’t support (most?) UNC paths because it’s run by cmd.exe. There’s a separate issue for that: #53764

@fbehrens

Copy link
Copy Markdown

Tereza Tomcova (@the-ress) thanks for mentioning, that's working indeed.

When invoking Code - Insiders.exe from powershell you need to type & "Code - Insiders.exe".

This is because of the spaces. I suggest to remove the spaces from the EXE filename.

@msftrncs

Copy link
Copy Markdown

Code.CMD supports UNC paths, AS LONG as you do not pass relative arguments. The message you see is just a warning. See #53764 (comment).

@github-actions github-actions Bot locked and limited conversation to collaborators Mar 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

VSCode 1.25 portable mode doesnt show GUI if started from network share

4 participants