Skip to content

Store cache in XDG cache dir on Linux and LOCALAPPDATA on Windows#66

Merged
ferronn-dev merged 3 commits into
mainfrom
worktree-bridge-cse_01QtWaV4JzrZPtperpps7m4m
May 26, 2026
Merged

Store cache in XDG cache dir on Linux and LOCALAPPDATA on Windows#66
ferronn-dev merged 3 commits into
mainfrom
worktree-bridge-cse_01QtWaV4JzrZPtperpps7m4m

Conversation

@ferronn-dev

Copy link
Copy Markdown
Member

Summary

  • Adds get_cache_dir() which resolves the cache location from $XDG_CACHE_HOME/tactless (or $HOME/.cache/tactless) on POSIX and %LOCALAPPDATA%/tactless on Windows
  • Replaces all cache/<hex> relative-path constructions in download_from_cdn, download_from_cdn_archive, and download_archives_index_multi with the platform-appropriate path
  • Creates the cache directory on first use

Test plan

  • On Linux: verify cache files appear under ~/.cache/tactless/ (or $XDG_CACHE_HOME/tactless/ if set)
  • On Windows: verify cache files appear under %LOCALAPPDATA%\tactless\
  • Confirm cache is used on subsequent runs (no re-download)

🤖 Generated with Claude Code

ferronn-dev and others added 3 commits May 23, 2026 08:27
Instead of writing to a relative cache/ directory, resolve the cache
location from $XDG_CACHE_HOME/tactless (or $HOME/.cache/tactless) on
POSIX systems and %LOCALAPPDATA%/tactless on Windows, creating the
directory on first use.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- get_cache_dir now fails if mkdir returns anything other than EEXIST
- cachedir stored in struct tactless and computed once in tactless_init
- threaded through all download functions as const char *cachedir

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@ferronn-dev ferronn-dev merged commit 7f77466 into main May 26, 2026
6 checks passed
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