Commit 0fd62784 authored by Bruce MacDonald's avatar Bruce MacDonald
Browse files

do not panic server if file cannot be opened

parent 29fe07f0
...@@ -974,7 +974,7 @@ func downloadBlob(mp ModelPath, digest string, regOpts *RegistryOptions, fn func ...@@ -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()
......
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