Merge pull request #473 from jmorganca/mxyng/fix-manifest-path

create manifests directory
This commit is contained in:
Michael Yang 2023-09-05 17:37:41 -07:00 committed by GitHub
commit d42d88386a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -114,7 +114,12 @@ func GetManifestPath() (string, error) {
return "", err
}
return filepath.Join(home, ".ollama", "models", "manifests"), nil
path := filepath.Join(home, ".ollama", "models", "manifests")
if err := os.MkdirAll(filepath.Dir(path), 0o755); err != nil {
return "", err
}
return path, nil
}
func GetBlobsPath(digest string) (string, error) {