Fixed tilde expansion in DB_PATH | Generated by AI
All fixed. Here’s what happened and what was done:
Root cause: ~/.config/ww/.env had DB_PATH=~/projects/jekyll-ai-blog/ww.db (literal tilde). In ww/db.py, get_db_path() returned DB_PATH directly without os.path.expanduser(), so os.makedirs() treated the ~ as a literal directory name — creating fineweb-code-sec-gpt/~/projects/jekyll-ai-blog/ww.db when you ran from zz/.
Fixes applied:
-
ww/db.py— addedos.path.expanduser()to theDB_PATHbranch so~gets expanded whether it comes from env var or.envfile. Committed as1d283a1. -
~/.config/ww/.env— changedDB_PATHfrom~/projects/jekyll-ai-blog/ww.db→~/.config/ww/ww.db(canonical XDG config location). -
zzrepo — removed the tracked~/projects/jekyll-ai-blog/ww.dbfile from git history viagit commit --amend, deleted the literal~directory tree, and added*.dbto.gitignoreto prevent future sqlite files from being accidentally committed.
Now when ww writes its command history db, it goes to ~/.config/ww/ww.db with the tilde properly expanded, so no more ghost directories under your project.