File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -2581,16 +2581,31 @@ impl Claim {
2581
2581
2582
2582
// update with any needed update hash adjustments
2583
2583
if svi. update_manifest_label . is_some ( ) {
2584
+ let mut start_adjust = 0 ;
2585
+ let mut start_offset = 0 ;
2584
2586
if let Some ( exclusions) = & mut dh. exclusions {
2585
2587
if let Some ( range) = & svi. manifest_store_range {
2586
2588
// find the range that starts at the same position as the manifest store range
2587
2589
if let Some ( pos) =
2588
2590
exclusions. iter ( ) . position ( |r| r. start ( ) == range. start ( ) )
2589
2591
{
2592
+ // find the adjustment length
2593
+ start_offset = range. start ( ) ;
2594
+ start_adjust =
2595
+ range. length ( ) . saturating_sub ( exclusions[ pos] . length ( ) ) ;
2596
+
2590
2597
// replace range using the size that covers entire manifest (including update manifests)
2591
2598
exclusions[ pos] = range. clone ( ) ;
2592
2599
}
2593
2600
}
2601
+ // fix up offsets affected by update manifest
2602
+ if start_offset > 0 {
2603
+ for exclusion in exclusions {
2604
+ if exclusion. start ( ) > start_offset {
2605
+ exclusion. set_start ( exclusion. start ( ) + start_adjust) ;
2606
+ }
2607
+ }
2608
+ }
2594
2609
}
2595
2610
}
2596
2611
You can’t perform that action at this time.
0 commit comments