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
9239a254
Unverified
Commit
9239a254
authored
May 27, 2025
by
Kyle Steere
Committed by
GitHub
May 27, 2025
Browse files
server: abort download on empty digest
Signed-off-by:
Kyle Steere
<
kyle.steere@chainguard.dev
>
parent
066d0f47
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
server/download.go
server/download.go
+4
-0
No files found.
server/download.go
View file @
9239a254
...
@@ -464,6 +464,10 @@ type downloadOpts struct {
...
@@ -464,6 +464,10 @@ type downloadOpts struct {
// downloadBlob downloads a blob from the registry and stores it in the blobs directory
// downloadBlob downloads a blob from the registry and stores it in the blobs directory
func
downloadBlob
(
ctx
context
.
Context
,
opts
downloadOpts
)
(
cacheHit
bool
,
_
error
)
{
func
downloadBlob
(
ctx
context
.
Context
,
opts
downloadOpts
)
(
cacheHit
bool
,
_
error
)
{
if
opts
.
digest
==
""
{
return
false
,
fmt
.
Errorf
((
"%s: %s"
),
opts
.
mp
.
GetNamespaceRepository
(),
"digest is is empty"
)
}
fp
,
err
:=
GetBlobsPath
(
opts
.
digest
)
fp
,
err
:=
GetBlobsPath
(
opts
.
digest
)
if
err
!=
nil
{
if
err
!=
nil
{
return
false
,
err
return
false
,
err
...
...
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