Skip to content

Commit

Permalink
Don't download zero size blobs
Browse files Browse the repository at this point in the history
Fixes #271
  • Loading branch information
chrisstaite-menlo committed Sep 11, 2023
1 parent f835e6d commit c8e2ee8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cas/store/grpc_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,11 @@ impl StoreTrait for GrpcStore {
return self.get_action_result_as_part(digest, writer, offset, length).await;
}

// Shortcut for empty blobs.
if digest.size_bytes == 0 {
return writer.send_eof().await;
}

let resource_name = format!(
"{}/blobs/{}/{}",
&self.instance_name,
Expand Down

0 comments on commit c8e2ee8

Please sign in to comment.