Skip to content

Add XDG support for metadata directory#255

Open
lb803 wants to merge 6 commits into
OfflineIMAP:testingfrom
lb803:add_xdg_support_metadata_directory
Open

Add XDG support for metadata directory#255
lb803 wants to merge 6 commits into
OfflineIMAP:testingfrom
lb803:add_xdg_support_metadata_directory

Conversation

@lb803

@lb803 lb803 commented Jun 27, 2026

Copy link
Copy Markdown

This v1.1 template stands in .github/.

This PR

Add character x [x].

  • I've read the DCO.
  • I've read the Coding Guidelines
  • The relevant information about the changes stands in the commit message, not here in the message of the pull request.
  • Code changes follow the style of the files they change.
  • Code is tested (provide details).

References

Additional information

This addresses an issue where offlineimap did not automatically evaluate XDG conventions for the metadata directory location.

While users could manually specify XDG paths in the config file, the code never proactively checked them. Following the existing pattern from init.py (lines 216-229), we now check for XDG_DATA_HOME before falling back to ~/.offlineimap.

The implementation follows a light touch approach: XDG locations are evaluated first, but users can still override via configuration. No XDG enforcement is added. Patch includes unit tests: baseline, regression and new feature coverage.

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.

1 participant