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

Projects
None yet
3 participants
@the-ress
Copy link
Contributor

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

This comment has been minimized.

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

2 checks passed

VS Code #20190107.1 succeeded
Details
license/cla All CLA requirements met.

@bpasero bpasero added this to the December/January 2019 milestone Jan 7, 2019

@the-ress the-ress deleted the the-ress:issue-53857 branch Jan 7, 2019

@fbehrens

This comment has been minimized.

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

This comment has been minimized.

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

This comment has been minimized.

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

This comment has been minimized.

Copy link

fbehrens commented Jan 14, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment