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

Handle UNC paths correctly in bootstrap.js #66128

Merged
merged 1 commit into from
Jan 7, 2019

Conversation

the-ress
Copy link
Contributor

@the-ress the-ress commented Jan 7, 2019

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

Fixes #53857

@bpasero
Copy link
Member

bpasero commented Jan 7, 2019

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

@bpasero bpasero merged commit e9d6a65 into microsoft:master Jan 7, 2019
@bpasero bpasero added this to the December/January 2019 milestone Jan 7, 2019
@the-ress the-ress deleted the issue-53857 branch January 7, 2019 12:07
@fbehrens
Copy link

fbehrens commented Jan 14, 2019

@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
Member

bpasero commented Jan 14, 2019

@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
Copy link
Contributor Author

the-ress commented Jan 14, 2019

@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

@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

msftrncs commented May 5, 2019

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