mirror of
https://github.com/filebrowser/filebrowser.git
synced 2025-07-09 17:42:59 +00:00
fix: log error if branding file exists but cannot be loaded
This commit is contained in:
parent
cc6db83988
commit
3645b578cd
@ -124,7 +124,10 @@ func getStaticHandlers(store *storage.Storage, server *settings.Server, assetsFs
|
||||
if d.settings.Branding.Files != "" {
|
||||
if strings.HasPrefix(r.URL.Path, "img/") {
|
||||
fPath := filepath.Join(d.settings.Branding.Files, r.URL.Path)
|
||||
if _, err := os.Stat(fPath); err == nil {
|
||||
_, err := os.Stat(fPath)
|
||||
if err != nil && !os.IsNotExist(err) {
|
||||
log.Printf("could not load branding file override: %v", err)
|
||||
} else if err == nil {
|
||||
http.ServeFile(w, r, fPath)
|
||||
return 0, nil
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user