Moved buffer allocation outside of while loop in SpillCollector

This commit is contained in:
Carl Johnsen
2026-03-23 06:53:42 +01:00
parent a67cc2e019
commit 4ed6de1967
@@ -95,6 +95,7 @@ namespace Duplicati.Library.Main.Operation.Backup
return target;
}
var buffer = new byte[options.Blocksize];
while (lst.Count > 1)
{
@@ -110,8 +111,6 @@ namespace Duplicati.Library.Main.Operation.Backup
// Remove it from the list of active operations
lst.RemoveAt(0);
var buffer = new byte[options.Blocksize];
using (var rd = new BlockVolumeReader(options.CompressionModule, source.BlockVolume.LocalFilename, options))
{
// Make sure we process the blocklisthashes, even if the blockvolume is empty