skip hidden files in list models handler (#4247)
This commit is contained in:
parent
dc9b1111e0
commit
8cbd3e7510
1 changed files with 6 additions and 0 deletions
|
@ -733,6 +733,12 @@ func (s *Server) ListModelsHandler(c *gin.Context) {
|
|||
return err
|
||||
}
|
||||
|
||||
if hidden, err := filepath.Match(".*", filepath.Base(rel)); err != nil {
|
||||
return err
|
||||
} else if hidden {
|
||||
return nil
|
||||
}
|
||||
|
||||
n := model.ParseNameFromFilepath(rel)
|
||||
m, err := ParseNamedManifest(n)
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in a new issue