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

Mac can be cases-sensitive #16591

Closed
jrieken opened this issue Dec 6, 2016 · 7 comments · Fixed by #22957
Closed

Mac can be cases-sensitive #16591

jrieken opened this issue Dec 6, 2016 · 7 comments · Fixed by #22957
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug verified Verification succeeded workbench-hot-exit Preservation of unsaved changes across restarts
Milestone

Comments

@jrieken
Copy link
Member

jrieken commented Dec 6, 2016

re #16544

Backup files with same string but different casing on Linux (as the file system is case sensitive), make sure there are no collisions

This is more FYI that also on macOS case-sensitive file systems exist. The default is insensitive but it's easy to change. Unsure if hot-exit will handle that gracefully?

@bpasero
Copy link
Member

bpasero commented Dec 6, 2016

This is some general debt we have which imho we can only get out by checking right on startup if you can create 2 files with different casing and then store this result somewhere accessible in all places throughout the code where today we do a simple assumption.

@jrieken
Copy link
Member Author

jrieken commented Dec 6, 2016

Yeah - I am just a little worried that in the workspace.json stores all path in its lowercase variant which seems like a good way to get in trouble.

@bpasero
Copy link
Member

bpasero commented Dec 6, 2016

@Tyriar wouldn't it be better to store the case as it comes in from the user but when comparing to another path just lowercase both?

@Tyriar Tyriar added this to the November 2016 milestone Dec 6, 2016
@Tyriar Tyriar added bug Issue identified by VS Code Team member as probable bug workbench-hot-exit Preservation of unsaved changes across restarts labels Dec 6, 2016
@Tyriar
Copy link
Member

Tyriar commented Dec 6, 2016

@bpasero with workspaces yes, paths are a little more tricky though as we need the path in order to generate the hash. Maybe the best way to fix this is to add some IEnvironmentService.arePathsCaseSensitive or something and use that instead of isLinux?

@Tyriar
Copy link
Member

Tyriar commented Dec 6, 2016

http://apple.stackexchange.com/a/22304 shows how you can query the disk, attempting to write and then caching it would probably be a better, more general solution?

@bpasero
Copy link
Member

bpasero commented Dec 7, 2016

@Tyriar yes, it should be in the environment service and it is as simple as doing the writing I would say instead of spawning some disk commands that are platform dependent.

I see the problem with the hash, so always using lowercase makes sense for those if you run on a case insensitive file system.

@Tyriar
Copy link
Member

Tyriar commented Dec 8, 2016

Storing the paths as they are (whether the FS case sensitive or not) is covered in #16829

@Tyriar Tyriar modified the milestones: January 2017, November 2016 Dec 8, 2016
@Tyriar Tyriar modified the milestones: January 2017, February 2017 Jan 23, 2017
@Tyriar Tyriar modified the milestones: February 2017, Backlog Feb 21, 2017
bpasero added a commit that referenced this issue Mar 21, 2017
backups: stop lowercasing file paths (fixes #16591)
@bpasero bpasero modified the milestones: March 2017, Backlog Mar 21, 2017
@bpasero bpasero self-assigned this Mar 21, 2017
@jrieken jrieken added the verified Verification succeeded label Mar 30, 2017
@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 workbench-hot-exit Preservation of unsaved changes across restarts
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants