From d20d8a0e3877680f5b4b417db84259be255ae334 Mon Sep 17 00:00:00 2001 From: Jordan Brown Date: Mon, 4 Oct 2021 12:56:40 -0400 Subject: [PATCH] Fix repository progress calculations --- src/Tgstation.Server.Host/Components/Repository/Repository.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Tgstation.Server.Host/Components/Repository/Repository.cs b/src/Tgstation.Server.Host/Components/Repository/Repository.cs index 55603a08d4..0ebddb2640 100644 --- a/src/Tgstation.Server.Host/Components/Repository/Repository.cs +++ b/src/Tgstation.Server.Host/Components/Repository/Repository.cs @@ -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 {