@@ -480,7 +480,7 @@ func UpdateIndex(ctx context.Context, req *rpc.UpdateIndexRequest, downloadCB rp
480
480
downloadCB .Start (u , tr ("Downloading index: %s" , u ))
481
481
downloadCB .End (false , msg )
482
482
failed = true
483
- result .UpdatedIndexes = append (result .UpdatedIndexes , report (URL , rpc .IndexUpdateReport_STATUS_FAILED ))
483
+ result .UpdatedIndexes = append (result .GetUpdatedIndexes () , report (URL , rpc .IndexUpdateReport_STATUS_FAILED ))
484
484
continue
485
485
}
486
486
@@ -498,9 +498,9 @@ func UpdateIndex(ctx context.Context, req *rpc.UpdateIndexRequest, downloadCB rp
498
498
downloadCB .Start (u , tr ("Downloading index: %s" , filepath .Base (URL .Path )))
499
499
downloadCB .End (false , msg )
500
500
failed = true
501
- result .UpdatedIndexes = append (result .UpdatedIndexes , report (URL , rpc .IndexUpdateReport_STATUS_FAILED ))
501
+ result .UpdatedIndexes = append (result .GetUpdatedIndexes () , report (URL , rpc .IndexUpdateReport_STATUS_FAILED ))
502
502
} else {
503
- result .UpdatedIndexes = append (result .UpdatedIndexes , report (URL , rpc .IndexUpdateReport_STATUS_SKIPPED ))
503
+ result .UpdatedIndexes = append (result .GetUpdatedIndexes () , report (URL , rpc .IndexUpdateReport_STATUS_SKIPPED ))
504
504
}
505
505
continue
506
506
}
@@ -512,14 +512,14 @@ func UpdateIndex(ctx context.Context, req *rpc.UpdateIndexRequest, downloadCB rp
512
512
downloadCB .Start (u , tr ("Downloading index: %s" , filepath .Base (URL .Path )))
513
513
downloadCB .End (false , tr ("Invalid index URL: %s" , err ))
514
514
failed = true
515
- result .UpdatedIndexes = append (result .UpdatedIndexes , report (URL , rpc .IndexUpdateReport_STATUS_FAILED ))
515
+ result .UpdatedIndexes = append (result .GetUpdatedIndexes () , report (URL , rpc .IndexUpdateReport_STATUS_FAILED ))
516
516
continue
517
517
}
518
518
indexFile := indexpath .Join (indexFileName )
519
519
if info , err := indexFile .Stat (); err == nil {
520
520
ageSecs := int64 (time .Since (info .ModTime ()).Seconds ())
521
521
if ageSecs < req .GetUpdateIfOlderThanSecs () {
522
- result .UpdatedIndexes = append (result .UpdatedIndexes , report (URL , rpc .IndexUpdateReport_STATUS_ALREADY_UP_TO_DATE ))
522
+ result .UpdatedIndexes = append (result .GetUpdatedIndexes () , report (URL , rpc .IndexUpdateReport_STATUS_ALREADY_UP_TO_DATE ))
523
523
continue
524
524
}
525
525
}
@@ -530,9 +530,9 @@ func UpdateIndex(ctx context.Context, req *rpc.UpdateIndexRequest, downloadCB rp
530
530
}
531
531
if err := indexResource .Download (indexpath , downloadCB ); err != nil {
532
532
failed = true
533
- result .UpdatedIndexes = append (result .UpdatedIndexes , report (URL , rpc .IndexUpdateReport_STATUS_FAILED ))
533
+ result .UpdatedIndexes = append (result .GetUpdatedIndexes () , report (URL , rpc .IndexUpdateReport_STATUS_FAILED ))
534
534
} else {
535
- result .UpdatedIndexes = append (result .UpdatedIndexes , report (URL , rpc .IndexUpdateReport_STATUS_UPDATED ))
535
+ result .UpdatedIndexes = append (result .GetUpdatedIndexes () , report (URL , rpc .IndexUpdateReport_STATUS_UPDATED ))
536
536
}
537
537
}
538
538
0 commit comments