Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
ollama
Commits
0fd62784
Commit
0fd62784
authored
Jul 24, 2023
by
Bruce MacDonald
Browse files
do not panic server if file cannot be opened
parent
29fe07f0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
server/images.go
server/images.go
+1
-1
No files found.
server/images.go
View file @
0fd62784
...
@@ -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
,
0
o644
)
out
,
err
:=
os
.
OpenFile
(
fp
+
"-partial"
,
os
.
O_CREATE
|
os
.
O_APPEND
|
os
.
O_WRONLY
,
0
o644
)
if
err
!=
nil
{
if
err
!=
nil
{
panic
(
err
)
return
fmt
.
Errorf
(
"open file: %w"
,
err
)
}
}
defer
out
.
Close
()
defer
out
.
Close
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment