diff --git a/Module/PSMinIO/bin/PSMinIO.dll b/Module/PSMinIO/bin/PSMinIO.dll index a04baad..b5e2b6e 100644 Binary files a/Module/PSMinIO/bin/PSMinIO.dll and b/Module/PSMinIO/bin/PSMinIO.dll differ diff --git a/Module/PSMinIO/bin/PSMinIO.pdb b/Module/PSMinIO/bin/PSMinIO.pdb index 41f6f12..ae798e7 100644 Binary files a/Module/PSMinIO/bin/PSMinIO.pdb and b/Module/PSMinIO/bin/PSMinIO.pdb differ diff --git a/src/Utils/ZipBuilder.cs b/src/Utils/ZipBuilder.cs index 40ddcf0..ad20f48 100644 --- a/src/Utils/ZipBuilder.cs +++ b/src/Utils/ZipBuilder.cs @@ -18,6 +18,7 @@ namespace PSMinIO.Utils private readonly ThreadSafeProgressCollector _progressCollector; private bool _disposed = false; private int _totalFiles = 0; + private readonly List _processedItems = new List(); // Activity IDs for progress tracking private const int ZipActivityId = 10; @@ -89,6 +90,9 @@ namespace PSMinIO.Utils _totalFiles = fileList.Count; var totalSize = fileList.OfType().Sum(f => f.Length); + // Track the processed items + _processedItems.AddRange(fileList); + MinIOLogger.WriteVerbose(_cmdlet, "Starting zip compression: {0} files, {1} total size", _totalFiles, SizeFormatter.FormatBytes(totalSize)); @@ -113,6 +117,10 @@ namespace PSMinIO.Utils _totalFiles = files.Length; var totalSize = files.Sum(f => f.Length); + // Track the processed directory and its files + _processedItems.Add(directoryInfo); + _processedItems.AddRange(files); + MinIOLogger.WriteVerbose(_cmdlet, "Adding directory to zip: {0} ({1} files, {2})", directoryInfo.Name, _totalFiles, SizeFormatter.FormatBytes(totalSize)); @@ -220,7 +228,8 @@ namespace PSMinIO.Utils TotalUncompressedSize = _zipBuilder.TotalUncompressedSize, TotalCompressedSize = _zipBuilder.TotalCompressedSize, CompressionRatio = _zipBuilder.CompressionRatio, - SpaceSaved = _zipBuilder.TotalUncompressedSize - _zipBuilder.TotalCompressedSize + SpaceSaved = _zipBuilder.TotalUncompressedSize - _zipBuilder.TotalCompressedSize, + ProcessedItems = new List(_processedItems) // Create a copy of the processed items }; } @@ -252,6 +261,7 @@ namespace PSMinIO.Utils public long TotalCompressedSize { get; set; } public double CompressionRatio { get; set; } public long SpaceSaved { get; set; } + public List ProcessedItems { get; set; } = new List(); public double CompressionEfficiency => (1 - CompressionRatio) * 100; public double AverageSpeed => Duration.TotalSeconds > 0 ? TotalUncompressedSize / Duration.TotalSeconds : 0; }