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

Basically support XDG Base Directory specification on Linux #132

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

WhiredPlanck
Copy link

@WhiredPlanck WhiredPlanck commented Dec 20, 2021

This PR will fix Issue Aegisub#226. Inspired by or adapted from aria2/aria2@8bc1d37 and Aegisub#148.

My basic idea just is:

  • If $HOME/.aegisub exists, then the program will still read/write config/cache/data from there;
  • If $HOME/.aegisub doesn't exist, then the program will read/write config/cache/data from corresponding XDG Base Directory.

I think this idea may need more optimization, but I just pull a request first so we could discuss the detail.

@WhiredPlanck
Copy link
Author

I've tested this on my system, work as expect.

@polirritmico
Copy link

Thanks! work without problems.

@WhiredPlanck
Copy link
Author

Thanks! work without problems.

You're welcome, and thanks for your test result too ~

Copy link

@louisroyer louisroyer left a comment

Choose a reason for hiding this comment

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

Hi, thanks for this work.

Could you update your code to use $XDG_STATE_HOME (according to version 0.8 of basedir-spec) to store history/log/autoback/autosave instead of $XDG_CONFIG_HOME ?

Also for code clarity, I suggest you to rename ?localto ?cache and ?user to ?config (and to create ?state).

@WhiredPlanck
Copy link
Author

Hi, thanks for this work.

Could you update your code to use $XDG_STATE_HOME (according to version 0.8 of basedir-spec) to store history/log/autoback/autosave instead of $XDG_CONFIG_HOME ?

Also for code clarity, I suggest you to rename ?localto ?cache and ?user to ?config (and to create ?state).

Sure. But now I am too busy to work on this. I will make my way to update the code. Anyway, thanks for your review and suggestions ~

@WhiredPlanck
Copy link
Author

WhiredPlanck commented Jan 14, 2024

Could you update your code to use $XDG_STATE_HOME (according to version 0.8 of basedir-spec) to store history/log/autoback/autosave instead of $XDG_CONFIG_HOME ?

@louisroyer I finish this in commit 6fba9a6.

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.

3 participants