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

wishlist: Use Basedir configuration directories on Linux #433

Closed
popjdh opened this issue Jun 19, 2024 · 3 comments
Closed

wishlist: Use Basedir configuration directories on Linux #433

popjdh opened this issue Jun 19, 2024 · 3 comments
Labels
enhancement 功能增强

Comments

@popjdh
Copy link

popjdh commented Jun 19, 2024

App should follow the xdg basedir spec. More information can be found here: http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html

In Linux, the default configuration directory can follow this priority

  1. "$ALIYUNPAN_CONFIG_DIR"
  2. "$XDG_CONFIG_HOME"/aliyunpan
  3. "$HOME"/.config/aliyunpan
@popjdh
Copy link
Author

popjdh commented Jun 19, 2024

Similarly, the download directory should also follow the xdg user directories.

  1. "$ALIYUNPAN_DOWNLOAD_DIR"
  2. "$XDG_DOWNLOAD_DIR" (Not a environment variable: https://www.freedesktop.org/wiki/Software/xdg-user-dirs/)
  3. "~/Downloads"

I found this repo https://github.com/adrg/xdg. I am not familiar with go, but It seems that this should be able to complete the above functions.

@xiaoyaofenfen xiaoyaofenfen added the enhancement 功能增强 label Jun 20, 2024
@xiaoyaofenfen
Copy link
Collaborator

thanks for your feedback.

Similarly, the download directory should also follow the xdg user directories.

  1. "$ALIYUNPAN_DOWNLOAD_DIR"
  2. "$XDG_DOWNLOAD_DIR" (Not a environment variable: https://www.freedesktop.org/wiki/Software/xdg-user-dirs/)
  3. "~/Downloads"

I found this repo https://github.com/adrg/xdg. I am not familiar with go, but It seems that this should be able to complete the above functions.

thanks for your feedback. it seems to work, we will add it in the next version.

@tickstep
Copy link
Owner

v0.3.3 new version has support the XDG folder rule

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement 功能增强
Projects
None yet
Development

No branches or pull requests

3 participants