Merge pull request #76 from owncloud/die-on-missing-assets

Die on missing assets
This commit is contained in:
Benedikt Kulmann
2020-08-13 14:07:38 +02:00
committed by GitHub
2 changed files with 9 additions and 2 deletions

View File

@@ -0,0 +1,7 @@
Bugfix: exit when assets are not found
When a non-existing assets folders is specified, there was only a warning log statement and the service served
the builtin assets instead. It is safe to exit the service in such a scenario, instead of serving other assets
than specified. We changed the log level to `Fatal` on non-existing assets.
https://github.com/owncloud/ocis-phoenix/pull/76

View File

@@ -36,9 +36,9 @@ func (a assets) Open(original string) (http.File, error) {
return f, nil
}
} else {
a.logger.Warn().
a.logger.Fatal().
Str("path", a.config.Asset.Path).
Msg("Assets directory doesn't exist")
Msg("assets directory doesn't exist")
}
}