fix: log error if branding file exists but cannot be loaded
							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…
	
		Reference in New Issue
	
	 Henrique Dias
						Henrique Dias