Skip to content

Conversation

caarlos0
Copy link
Member

closes #549

make sure the CACHE/conversations dir is created as well

caarlos0 added 2 commits July 10, 2025 10:21
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
@caarlos0 caarlos0 self-assigned this Jul 10, 2025
@caarlos0 caarlos0 added the bug Something isn't working label Jul 10, 2025
@caarlos0 caarlos0 changed the title fix: openDB on Linux fix: mkdir parent db directory Jul 10, 2025
@caarlos0 caarlos0 requested review from Copilot and andreynering July 10, 2025 14:51
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR ensures the CACHE/conversations directory is created at startup and fixes how the cache path is displayed.

  • Switched from printing the parent directory of CachePath to printing the full CachePath
  • Updated ensureConfig to create the conversations subfolder under the cache directory

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
main.go Print the actual cache path instead of its parent
config.go Use os.MkdirAll to create CACHE/conversations
Comments suppressed due to low confidence (2)

config.go:237

  • [nitpick] The error message "Could not create cache directory." may be misleading since this is specifically creating the "conversations" subdirectory. Consider updating it to reference the full path or mention "conversations" explicitly.
		filepath.Join(c.CachePath, "conversations"),

config.go:236

  • Add a unit test to verify that ensureConfig actually creates the conversations directory under CachePath, preventing future regressions.
	if err := os.MkdirAll(

@caarlos0 caarlos0 merged commit 7315d4f into main Jul 10, 2025
16 checks passed
@caarlos0 caarlos0 deleted the fix-open-db branch July 10, 2025 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error opening SQLITE database
1 participant