do not panic server if file cannot be opened

This commit is contained in:
Bruce MacDonald 2023-07-24 15:23:50 -04:00
parent 29fe07f0cc
commit 0fd6278446

View file

@ -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)
if err != nil {
panic(err)
return fmt.Errorf("open file: %w", err)
}
defer out.Close()