Skip to content

Commit bb71014

Browse files
committed
CompressArchiveCommand: fix issues with progress formatting
- The progress now is actually reported. - The progress now uses current culture.
1 parent b783599 commit bb71014

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/CompressArchiveCommand.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ protected override void EndProcessing()
203203
{
204204
// Update progress
205205
var percentComplete = numberOfAddedItems / (float)numberOfAdditions * 100f;
206-
progressRecord.StatusDescription = string.Format(Messages.ProgressDisplay, "{percentComplete:0.0}");
206+
progressRecord.StatusDescription = string.Format(Messages.ProgressDisplay, $"{percentComplete:0.0}");
207207
WriteProgress(progressRecord);
208208

209209
if (ShouldProcess(target: entry.FileSystemInfo.FullName, action: Messages.Add))
@@ -219,7 +219,7 @@ protected override void EndProcessing()
219219

220220
// Once all items in the archive are processed, show progress as 100%
221221
// This code is here and not in the loop because we want it to run even if there are no items to add to the archive
222-
progressRecord.StatusDescription = string.Format(Messages.ProgressDisplay, "100.0");
222+
progressRecord.StatusDescription = string.Format(Messages.ProgressDisplay, $"{100.0:0.0}");
223223
WriteProgress(progressRecord);
224224
}
225225
finally

0 commit comments

Comments
 (0)