diff --git a/Source/LibationCli/ConsoleProgressBar.cs b/Source/LibationCli/ConsoleProgressBar.cs index 6a42bffc..1e4b85c5 100644 --- a/Source/LibationCli/ConsoleProgressBar.cs +++ b/Source/LibationCli/ConsoleProgressBar.cs @@ -1,4 +1,5 @@ -using System; +using Dinah.Core; +using System; using System.IO; namespace LibationCli; @@ -30,7 +31,6 @@ internal class ConsoleProgressBar } } - private double m_Progress; private TimeSpan m_RemainingTime; private int m_LastWriteLength = 0; private const int MAX_ETA_LEN = 10; @@ -51,7 +51,7 @@ internal class ConsoleProgressBar private void WriteProgress() { - var numCompleted = (int)Math.Round(double.Min(100, m_Progress) * m_NumProgressPieces / 100); + var numCompleted = (int)Math.Round(double.Min(100, Progress?? 0) * m_NumProgressPieces / 100); var numRemaining = m_NumProgressPieces - numCompleted; var progressBar = $"[{new string(ProgressChar, numCompleted)}{new string(NoProgressChar, numRemaining)}] ";