Unverified Commit 45ac07cd authored by Patrick Devine's avatar Patrick Devine Committed by GitHub
Browse files

create the blobs directory correctly (#508)

parent 7d749cc7
...@@ -133,7 +133,12 @@ func GetBlobsPath(digest string) (string, error) { ...@@ -133,7 +133,12 @@ func GetBlobsPath(digest string) (string, error) {
} }
path := filepath.Join(home, ".ollama", "models", "blobs", digest) path := filepath.Join(home, ".ollama", "models", "blobs", digest)
if err := os.MkdirAll(filepath.Dir(path), 0o755); err != nil { dirPath := filepath.Dir(path)
if digest == "" {
dirPath = path
}
if err := os.MkdirAll(dirPath, 0o755); err != nil {
return "", err return "", err
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment