Unverified Commit 1580ed4c authored by Michael Yang's avatar Michael Yang Committed by GitHub
Browse files

Merge pull request #4295 from ollama/mxyng/fix-list

routes: skip invalid filepaths
parents 788b092c a7ee84fc
......@@ -732,6 +732,11 @@ func (s *Server) ListModelsHandler(c *gin.Context) {
}
n := model.ParseNameFromFilepath(rel)
if !n.IsValid() {
slog.Info("invalid model filepath", "path", rel)
return nil
}
m, err := ParseNamedManifest(n)
if err != nil {
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