fix mkdir blob path

This commit is contained in:
Michael Yang
2023-07-18 11:24:19 -07:00
parent a9cc270b4d
commit f20426a768
2 changed files with 2 additions and 16 deletions

View File

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