Merge pull request #99 from jmorganca/mkdir-blobs

fix mkdir blob path
This commit is contained in:
Michael Yang 2023-07-18 11:29:05 -07:00 committed by GitHub
commit 38f0c54c64
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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
}