Skip to content

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

Closed
Daniel Imms (Tyriar) wants to merge 2 commits into
masterfrom
tyriar/migrate-user-data-dir
Closed

Daniel Imms (Tyriar) wants to merge 2 commits into
masterfrom
tyriar/migrate-user-data-dir

Conversation

@Tyriar

Copy link
Copy Markdown
Contributor

Benjamin Pasero (@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
Copy Markdown

By analyzing the blame information on this pull request, we identified João Moreno (@joaomoreno), Dirk Bäumer (@dbaeumer) and Benjamin Pasero (@bpasero) to be potential reviewers

@Tyriar

Copy link
Copy Markdown
Contributor Author

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.

Comment thread src/main.js
if (process.env.VSCODE_DEV) {
var appData = app.getPath('appData');
app.setPath('userData', path.join(appData, 'Code-Development'));
configDir += '-dev';

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@bpasero

Copy link
Copy Markdown
Contributor

Daniel Imms (@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
Copy Markdown
Contributor Author

Benjamin Pasero (@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
Copy Markdown
Contributor Author

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

@Tyriar Daniel Imms (Tyriar) removed this from the June 2016 milestone Jun 13, 2016
@Tyriar
Daniel Imms (Tyriar) deleted the tyriar/migrate-user-data-dir branch July 5, 2017 10:28
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