Skip to content

Conversation

@dpschen
Copy link
Contributor

@dpschen dpschen commented Jul 2, 2025

No description provided.


// Update the database path to match a changed rootpath when it was not explicitly set
defaultDBPath := filepath.Join(getBinaryDirLocation(), "vikunja.db")
if DatabasePath.GetString() == defaultDBPath {
Copy link
Member

Choose a reason for hiding this comment

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

This seems redundant since the default root path is the directory of the binary?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If I understood it correctly, that's incorrect.

Because database.path is calculated before service.rootpath (from the user) is read.
=> gets “stuck” on the binary-directory path.

I replaced to code to make it clearer.

Copy link
Member

Choose a reason for hiding this comment

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

But shouldn't the fix then be to initialize the rootpath before the database path?

@dpschen dpschen force-pushed the feat/update-default-databasepath-and-documentation branch from 34b11e9 to b28ad0c Compare July 3, 2025 13:37
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.

2 participants