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

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
}