mirror of
https://github.com/tcsenpai/ollama.git
synced 2025-07-07 18:10:04 +00:00
create the blobs directory correctly (#508)
This commit is contained in:
parent
7d749cc787
commit
45ac07cd02
@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user