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

Error when trying to save to root of drive #379

Closed
RWeigelt opened this issue Nov 20, 2015 · 11 comments · Fixed by #475
Closed

Error when trying to save to root of drive #379

RWeigelt opened this issue Nov 20, 2015 · 11 comments · Fixed by #475
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug verified Verification succeeded
Milestone

Comments

@RWeigelt
Copy link

In version 0.10.1 it is no longer possible to write to the root of a drive (which worked up to 0.9.1).
When trying to save to e.g. r:\example.txt, the following error message appears:

EPERM: operation not permitted, mkdir 'r:\'

Tested on Windows 7 Ultimate and Windows 10 Professional, US language, German region settings.

@bpasero
Copy link
Member

bpasero commented Nov 20, 2015

@RWeigelt are you sure you can save there, can you try with nodepad?

@RWeigelt
Copy link
Author

Yes, I can write a text file with notepad. And I also tried other drives.
What I found out in the meantime is that this happens only when creating a new file. Opening, editing and saving an existing file works correctly.

@bpasero
Copy link
Member

bpasero commented Nov 20, 2015

@RWeigelt so you do Ctrl+N, type something and then try to save it to r: from the windows save dialog?

@RWeigelt
Copy link
Author

Exactly. The error message appears trying to use Save, Save As or (when creating multiple files), Save All.

@bpasero
Copy link
Member

bpasero commented Nov 20, 2015

@RWeigelt is R: some drive created with subst or a real physical drive? I assume it is not the root drive where windows is installed?

@RWeigelt
Copy link
Author

R: is a RAM disk - so I suspected this to be the problem at first. That's why I checked on other, "real" drives (except the system drive C:), and I can reproduce the behavior.

@RWeigelt
Copy link
Author

What I'm not sure about is why VSCode is trying to run mkdir r:\ at all. When I do this from a command line (cmd.exe), I get an "Access is denied" there as well - which doesn't surprise me.

@codepic
Copy link

codepic commented Nov 20, 2015

It actually tries to create the root path :)

If you run VS Code as non-admin, it won't even let you try to save to C:\file.ext but if you run VS Code as admin, it will let you try but fails on creating c:\.

capture

@bpasero bpasero self-assigned this Nov 21, 2015
@bpasero
Copy link
Member

bpasero commented Nov 21, 2015

Thanks, will look into it!

@bpasero bpasero assigned joaomoreno and unassigned bpasero Nov 23, 2015
@bpasero bpasero added this to the Nov 2015 - Recovery milestone Nov 23, 2015
@bpasero bpasero added the bug Issue identified by VS Code Team member as probable bug label Nov 23, 2015
@bpasero
Copy link
Member

bpasero commented Nov 23, 2015

This looks like a bad regression in pfs.mkdirp(). It relies on the EEXIST error but when reaching the root drive, it ends in EPERM. @joaomoreno I think you touched this function last.

@codepic
Copy link

codepic commented Feb 24, 2016

As of now, 0.10.8-insider build run as an administrator lets you save to D:

As far as I can see, @bpasero this is truly closed.

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants