"...centerface_pytorch.git" did not exist on "dfd658ff5517e211f18f46af1a33dacf7a00cd8d"
Commit a7ee84fc authored by Michael Yang's avatar Michael Yang
Browse files

routes: skip invalid filepaths

parent 5cde17a0
...@@ -732,6 +732,11 @@ func (s *Server) ListModelsHandler(c *gin.Context) { ...@@ -732,6 +732,11 @@ func (s *Server) ListModelsHandler(c *gin.Context) {
} }
n := model.ParseNameFromFilepath(rel) n := model.ParseNameFromFilepath(rel)
if !n.IsValid() {
slog.Info("invalid model filepath", "path", rel)
return nil
}
m, err := ParseNamedManifest(n) m, err := ParseNamedManifest(n)
if err != nil { if err != nil {
return err return err
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment