mirror of
https://github.com/tcsenpai/ollama.git
synced 2025-07-23 17:50:11 +00:00
do not panic server if file cannot be opened
This commit is contained in:
parent
29fe07f0cc
commit
0fd6278446
@ -974,7 +974,7 @@ func downloadBlob(mp ModelPath, digest string, regOpts *RegistryOptions, fn func
|
|||||||
|
|
||||||
out, err := os.OpenFile(fp+"-partial", os.O_CREATE|os.O_APPEND|os.O_WRONLY, 0o644)
|
out, err := os.OpenFile(fp+"-partial", os.O_CREATE|os.O_APPEND|os.O_WRONLY, 0o644)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
return fmt.Errorf("open file: %w", err)
|
||||||
}
|
}
|
||||||
defer out.Close()
|
defer out.Close()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user