Skip to content

[Bug]: TagStudio does not respect XDG_CONFIG_HOME #1407

Description

@LikeLakers2

Checklist

  • I am using an up-to-date version.
  • I have read the documentation.
  • I have searched existing issues.

TagStudio Version

9.6.0

Operating System & Version

Bazzite 44.20260629

Description

TagStudio stores its settings file in $HOME/.config/TagStudio. Since $HOME/.config is the default recommended by the XDG Base Directory Specification for $XDG_CONFIG_HOME, this would imply that TagStudio respects $XDG_CONFIG_HOME.

However, as seen at the definition of the config file path:

DEFAULT_GLOBAL_SETTINGS_PATH = (
Path.home() / "Appdata" / "Roaming" / "TagStudio" / "settings.toml"
if platform.system() == "Windows"
else Path.home() / ".config" / "TagStudio" / "settings.toml"
)

TagStudio only takes into account the home directory, and hardcodes .config/TagStudio into it.

Expected Behavior

I would expect TagStudio would respect $XDG_CONFIG_HOME, and thus store its config file at $XDG_CONFIG_HOME/TagStudio, if $XDG_CONFIG_HOME is set.

Steps to Reproduce

  1. Have a TagStudio settings directory at $HOME/.config/TagStudio
  2. Set $XDG_CONFIG_HOME to a different directory
  3. Open TagStudio and change your settings
  4. The new settings are still stored at $HOME/.config/TagStudio

Logs

No response

Additional Info

While testing, I noted that the cache file appears to respect XDG_CONFIG_HOME, per this logger statement:

logger.info(
"[Cache] Cache File not specified, using default one",
filename=self.cached_values.fileName(),
)

For example, if XDG_CONFIG_HOME is set to ~/.new_config_loc:

2026-07-01 06:21:12 [info     ] [Cache] Cache File not specified, using default one filename=/var/home/user/.new_config_loc/TagStudio/TagStudio.ini

Metadata

Metadata

Assignees

Labels

Type: BugSomething isn't working as intendedType: File SystemFile system interactions

Type

Fields

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions