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

Move user data to ~/.vscode[-variant]/user-data and automatically set root user data dir #5570

Closed
wants to merge 2 commits into from

Conversation

Tyriar
Copy link
Member

@Tyriar Tyriar commented Apr 20, 2016

@bpasero let me know what you think

Fixes #3884 and #5561

Permanently move the user data to a sub-folder of the config directory for the
current variant of code. For example:

- ~/.config/Code -> ~/.vscode/user-data
- ~/.config/Code\ -\ OSS -> ~/.vscode-oss/user-data
- ~/.config/Code-Development -> ~/.vscode-oss-dev/user-data

Fixes #3884
@mention-bot
Copy link

By analyzing the blame information on this pull request, we identified @joaomoreno, @dbaeumer and @bpasero to be potential reviewers

@Tyriar
Copy link
Member Author

Tyriar commented Apr 21, 2016

Actually, may not need the -root dir at all anymore because .config being so restrictive was the main reason for it. I'll check tomorrow.

if (process.env.VSCODE_DEV) {
var appData = app.getPath('appData');
app.setPath('userData', path.join(appData, 'Code-Development'));
configDir += '-dev';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bpasero
Copy link
Member

bpasero commented Apr 21, 2016

@Tyriar I did a quick scan over the changes. I hope you understand that this change - if done wrong - will break every existing user out there with no easy way to get back and possible corruption. I am not confident to do such a change so late in the game without extensive testing across all platforms and all corner cases.

@Tyriar
Copy link
Member Author

Tyriar commented Apr 21, 2016

@bpasero I'm reasonable confident it will work fine on OS X, it's completely untested on Windows atm. It might be best to defer to May considering I'll be gone starting next week (only 1 work day after today). I guess we'll make --user-data-dir for sudo a temporary thing in the April release.

@Tyriar
Copy link
Member Author

Tyriar commented Jun 13, 2016

Closing this off as the conflicts are pretty significant. Hoping to have another crack at this in July debt week.

@Tyriar Tyriar removed this from the June 2016 milestone Jun 13, 2016
@Tyriar Tyriar closed this Jul 18, 2016
@Tyriar Tyriar deleted the tyriar/migrate-user-data-dir branch July 5, 2017 10:28
@github-actions github-actions bot locked and limited conversation to collaborators Mar 27, 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.

Revisit VS Code folder structure for app data, settings, extensions
4 participants