mirror of
https://github.com/notherealmarco/WASAPhoto.git
synced 2025-05-05 12:22:35 +02:00
Fix data directory not creating on first run
This commit is contained in:
parent
ec0b06affc
commit
7543fd36e0
3 changed files with 16 additions and 7 deletions
|
@ -120,6 +120,14 @@ func run() error {
|
|||
logger.WithError(err).Error("error creating the API server instance")
|
||||
return fmt.Errorf("creating the API server instance: %w", err)
|
||||
}
|
||||
|
||||
// Create the directories if they don't exist
|
||||
if err := os.MkdirAll(cfg.Data.Path, 0755); err != nil {
|
||||
logger.WithError(err).Error("error creating data directory")
|
||||
return fmt.Errorf("creating data directory: %w", err)
|
||||
}
|
||||
|
||||
|
||||
router := apirouter.Handler()
|
||||
|
||||
router, err = registerWebUI(router)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue