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

[windows] [open workspace] can't read the content of "C" #663

Closed
marcdumais-work opened this issue Oct 18, 2017 · 10 comments
Closed

[windows] [open workspace] can't read the content of "C" #663

marcdumais-work opened this issue Oct 18, 2017 · 10 comments

Comments

@marcdumais-work
Copy link
Contributor

I can successfully select/open a workspace if it's located under /c/users/. But if I try to go up a directory, it seems that we're enable to read the files under /c/.

peek 2017-10-18 15-01

@kittaakos
Copy link
Contributor

Still same as: #631

@marcdumais-work marcdumais-work added the duplicate duplicated issues label Oct 19, 2017
@kittaakos
Copy link
Contributor

Ohh, sorry for the confusion, the other task is closed too. I have just put it there for future references. I am reopening this.

@kittaakos kittaakos reopened this Oct 19, 2017
@hexa00
Copy link

hexa00 commented Oct 19, 2017

Seems like it's not a duplicate?

@kittaakos
Copy link
Contributor

Seems like it is.

@hexa00
Copy link

hexa00 commented Oct 20, 2017

Could also be related to #199

@hexa00
Copy link

hexa00 commented Dec 1, 2017

I just retested this and it's still an issue.

@marcdumais-work
Copy link
Contributor Author

Since this issue is the one that remained open, I tagged #631 as being the duplicate, and removed the tag from this one here

@westbury
Copy link
Contributor

westbury commented Nov 7, 2018

This problem is caused by a confusion between the meanings of "c:" and "c:". When getting the directory listing for c:, it is passing a uri of file:///c%3A which is converted to "c:" by FileUri.fsPath. That is probably wrong and it should convert to "c:". The call to fs.readdir, when passed "c:", correctly returns a listing of the default directory, not the root directory. When these files are appended to the original uri, we get files that don't exist so they are removed from the list. Result: nothing in the list.

The conversion of file:///c%3A to c: is done by the vscode-uri module (see Uri.parse function). One might argue that the vscode-uri module is wrong but I suspect that we would get push-back if we tried to modify vscode-uri. The best place to fix this is probably in FileUri.fsPath. I'll submit a PR shortly.

@westbury
Copy link
Contributor

westbury commented Nov 7, 2018

Ha ha, it seems Github have decided to remove the backslashes from C : \ in the previous comment. I am sure you can figure out where backslashes followed c: in the comment.

@kittaakos
Copy link
Contributor

Fixed with #3419.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants