File tree Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -584,11 +584,18 @@ impl StoreDriver for GrpcStore {
584584 return self . update_action_result_from_bytes ( digest, reader) . await ;
585585 }
586586
587+ let digest_function = ActiveOriginContext :: get_value ( & ACTIVE_HASHER_FUNC )
588+ . err_tip ( || "In GrpcStore::update()" ) ?
589+ . map_or_else ( default_digest_hasher_func, |v| * v)
590+ . proto_digest_func ( )
591+ . as_str_name ( )
592+ . to_ascii_lowercase ( ) ;
587593 let mut buf = Uuid :: encode_buffer ( ) ;
588594 let resource_name = format ! (
589- "{}/uploads/{}/blobs/{}/{}" ,
595+ "{}/uploads/{}/blobs/{}/{}/{} " ,
590596 & self . instance_name,
591597 Uuid :: new_v4( ) . hyphenated( ) . encode_lower( & mut buf) ,
598+ digest_function,
592599 digest. packed_hash( ) ,
593600 digest. size_bytes( ) ,
594601 ) ;
@@ -675,10 +682,16 @@ impl StoreDriver for GrpcStore {
675682 if digest. size_bytes ( ) == 0 {
676683 return writer. send_eof ( ) ;
677684 }
678-
685+ let digest_function = ActiveOriginContext :: get_value ( & ACTIVE_HASHER_FUNC )
686+ . err_tip ( || "In GrpcStore::update()" ) ?
687+ . map_or_else ( default_digest_hasher_func, |v| * v)
688+ . proto_digest_func ( )
689+ . as_str_name ( )
690+ . to_ascii_lowercase ( ) ;
679691 let resource_name = format ! (
680- "{}/blobs/{}/{}" ,
692+ "{}/blobs/{}/{}/{} " ,
681693 & self . instance_name,
694+ digest_function,
682695 digest. packed_hash( ) ,
683696 digest. size_bytes( ) ,
684697 ) ;
You can’t perform that action at this time.
0 commit comments