fix(xva): off by one

if last block is not already written we must write it, not the next bloxk
This commit is contained in:
Florent Beauchamp
2024-02-05 15:34:39 +00:00
committed by Julien Fontanet
parent 4d24248ea2
commit bc00551cb3

View File

@@ -52,6 +52,6 @@ export default async function addDisk(pack, vhd, basePath) {
}
if (!written) {
// last block must be present
await writeBlock(pack, empty, formatBlockPath(basePath, counter))
await writeBlock(pack, empty, formatBlockPath(basePath, counter - 1))
}
}