Skip to content

Make database folder if it doesn't exist already #7

@mholt

Description

@mholt

This is a minor thing but will make integrations a little smoother and less error prone: if a database's containing directory does not exist, an error is returned:

Error opening database of Type badger with source /Users/matt/Library/Application Support/Caddy/acme_server/db: error opening Badger database: Error Creating Dir: "/Users/matt/Library/Application Support/Caddy/acme_server/db": mkdir /Users/matt/Library/Application Support/Caddy/acme_server/db: no such file or directory

This can be fixed by calling os.MkdirAll() before opening the DB, but as a user of the library I would have expected it to take care of that for me.

A simple enhancement, but not an urgent one! 👍

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions