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

Store state files in $XDG_STATE_HOME by default #3185

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

bartekpacia
Copy link
Contributor

This PR is targeted at #3176

@bartekpacia
Copy link
Contributor Author

@JoeKar So far I only updated the docs. Please let me know if such changes make sense, so I can start implementing them.

@bartekpacia bartekpacia marked this pull request as draft March 17, 2024 17:43
@dmaluka
Copy link
Collaborator

dmaluka commented Mar 17, 2024

This isn't gonna be backwards compatible, is it?

@bartekpacia
Copy link
Contributor Author

bartekpacia commented Mar 17, 2024

I was thinking about it, but in the initial proposal I decided to omit this. But I definitely would like to make this change completely painless for everyone. Making anyone lose time over such a minor change would be unprofessional.

By "backward compatibility", do you mean that if ~/.config/micro/backups and ~/.config/micro/buffers exist, they should be used and whatever is in ~/.local/state/micro should be ignored?

Another option would be to copy ~/.config/micro/backups and ~/.config/micro/buffers to ~/.local/state/micro.

@dmaluka
Copy link
Collaborator

dmaluka commented Mar 17, 2024

Dunno. Neither option seems perfect.

@JoeKar
Copy link
Collaborator

JoeKar commented Mar 17, 2024

The backward compatibility will be a nasty thing.

Another option would be to copy ~/.config/micro/backups and ~/.config/micro/buffers to ~/.local/state/micro.

In that case you will do this with every startup, right? Maybe it's better to move it then and maintain the new location only. 🤔

@bartekpacia
Copy link
Contributor Author

bartekpacia commented Mar 17, 2024

Maybe it's better to move it then and maintain the new location only.

Yeah, it's also an option.

The situation where the change I'm planning to make would cause problems seems very rare: Micro would have to crash, the user would have update in the meantime, and then the backup would be missing.

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

Successfully merging this pull request may close these issues.

None yet

3 participants