diff options
| author | James Mills <prologic@shortcircuit.net.au> | 2020-03-29 19:02:52 +1000 |
|---|---|---|
| committer | James Mills <prologic@shortcircuit.net.au> | 2020-03-29 19:02:52 +1000 |
| commit | 980a3edf63551b60a85307005cdb6f0380932d83 (patch) | |
| tree | f654806f165b3ba40affd4cc6bc4eb834d5371a3 /app/app.go | |
| parent | a22a2ae031f2c02b41aa9a7c1746b2989bcf0126 (diff) | |
Fix default server config and ensure upload and video paths exist
Diffstat (limited to 'app/app.go')
| -rw-r--r-- | app/app.go | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -162,6 +162,12 @@ func (a *App) Run() error { } a.Watcher.Add(p.Path) } + if err := os.MkdirAll(a.Config.Server.UploadPath, 0755); err != nil { + return fmt.Errorf( + "error creating upload path %s: %w", + a.Config.Server.UploadPath, err, + ) + } buildFeed(a) go startWatcher(a) return http.Serve(a.Listener, a.Router) |
