Skip to content

Draft: Resolve "Use XDG Base Directory specification"

Mart Lubbers requested to merge 18-use-xdg-base-directory-specification into main

What does this MR do?

Place nitrile's data files in a folder that is consistent with the XDG base directory specification.

  • On linux this was ~/.nitrile and this becomes ~/.local/share/nitrile. On windows a sane fallback is used (LocalApplicationData).
  • On windows this was %APPDATA%/Nitrile and this becomes _LocalApplicationData_/Nitrile. LocalApplicationData is a Known Folder. By default this equals to %LOCALAPPDATA% which again defaults to C:\Users\USERNAME\AppData\Local.
  • On mac this defaults to ~/Library/Application Support

Does this require a changelog entry?

Changes to public APIs

This requires a fresh installation of nitrile. If necessary, we can create a fallback that will check whether a ~/.nitrile exists if there is no Nitrile directory in the new location (because an older version was in use).

Author's checklist (required)

See https://gitlab.com/clean-nc/contributing#isocyanoclean-contributing-guidelines for the rationale behind these items:

  • The commit history does not contain merges (use git rebase -i main if it does)
  • Intermediate commits compile (use git rebase -i main if not)
  • Newly added code has a style consistent with the rest of the repository
  • Newly added code is documented
  • If bugs have been solved, tests have been added
  • A changelog entry has been added if required

Related issues

Closes #18 (closed)

Edited by Mart Lubbers

Merge request reports