Skip to content

fix(settings): honor XDG_CONFIG_HOME for the global settings path - #1581

Closed
sanketpatel32 wants to merge 1 commit into
TagStudioDev:mainfrom
sanketpatel32:devin/fix-xdg-config-home
Closed

sanketpatel32 wants to merge 1 commit into
TagStudioDev:mainfrom
sanketpatel32:devin/fix-xdg-config-home

Conversation

@sanketpatel32

Copy link
Copy Markdown

Summary

Fixes #1407. The global settings path on non-Windows platforms was hardcoded to ~/.config/TagStudio/settings.toml, ignoring $XDG_CONFIG_HOME.

  • DEFAULT_GLOBAL_SETTINGS_PATH now resolves through a small helper: on non-Windows it uses $XDG_CONFIG_HOME/TagStudio/settings.toml when the variable is set to an absolute path, and falls back to ~/.config/... when unset, empty, or relative (per the XDG Base Directory spec, relative values must be ignored).
  • Verified: XDG_CONFIG_HOME=/tmp/xdgtest → /tmp/xdgtest/TagStudio/settings.toml; unset and relative values fall back to ~/.config.

Tasks Completed

  • Platforms Tested:
    • Windows x86
    • Windows ARM
    • macOS x86
    • macOS ARM
    • Linux x86
    • Linux ARM
  • Tested For:
    • Basic functionality (path resolution verified for set/unset/relative XDG_CONFIG_HOME; pre-commit hooks passing)
    • PyInstaller executable

The non-Windows settings path was hardcoded to ~/.config. Per the XDG
Base Directory spec, $XDG_CONFIG_HOME (when set to an absolute path)
now takes precedence; empty or relative values are ignored.

Fixes TagStudioDev#1407
@CyanVoxel CyanVoxel closed this Nov 23, 2026
@TrigamDev TrigamDev added the Type: Invalid This doesn't seem right label Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type: Invalid This doesn't seem right

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: TagStudio does not respect XDG_CONFIG_HOME

3 participants