Add walking up parent directories when loading dotenv files#4147
Add walking up parent directories when loading dotenv files#4147revolter wants to merge 5 commits into
Conversation
It is used to load the dotenv file.
Previously, only a `.env` file next to the database was checked. Now parent directories are searched until a matching password entry is found. Related-to: 3cdc65a
There was a problem hiding this comment.
Pull request overview
This PR enhances the SQLCipher “dotenv” auto-unlock flow by extending the .env lookup beyond the database’s directory: it now walks up parent directories until it finds a matching password entry for the database filename. This builds on the earlier dotenv-based encrypted DB opening work referenced in PR #1404.
Changes:
- Add
QSettingsinclude to support reading.envfiles. - Replace single-directory
.envlookup with a parent-directory search loop, stopping once a matching password entry is found.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Hi @revolter, At least, I think this behaviour should be opt-in through a setting in the preferences' dialog. |
Previously, only a
.envfile next to the database was checked.Now parent directories are searched until a matching password entry
is found.
Related-to: 3cdc65a (#1404).