create manifests directory

This commit is contained in:
Michael Yang 2023-09-05 17:10:40 -07:00
parent d18282bfda
commit a1ecdd36d5

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) {