Fix repository progress calculations

This commit is contained in:
Jordan Brown
2021-10-04 12:56:40 -04:00
parent c52d587c9d
commit d20d8a0e38
@@ -1020,7 +1020,7 @@ namespace Tgstation.Server.Host.Components.Repository
CheckoutProgressHandler CheckoutProgressHandler(JobProgressReporter progressReporter, string stage) => (a, completedSteps, totalSteps) =>
{
int? percentage;
if (totalSteps > completedSteps || totalSteps == 0)
if (totalSteps < completedSteps || totalSteps == 0)
percentage = null;
else
{
@@ -1053,7 +1053,7 @@ namespace Tgstation.Server.Host.Components.Repository
float? percentage;
var totalObjectsToProcess = transferProgress.TotalObjects * 2;
var processedObjects = transferProgress.IndexedObjects + transferProgress.ReceivedObjects;
if (totalObjectsToProcess > processedObjects || totalObjectsToProcess == 0)
if (totalObjectsToProcess < processedObjects || totalObjectsToProcess == 0)
percentage = null;
else
{