Compare commits

...

2 Commits

Author SHA1 Message Date
Julien Fontanet
4b716584f7 feat(xo-server): 5.18.2 2018-04-11 17:48:59 +02:00
Julien Fontanet
4bc348f39f fix(xo-server/vhd/createReadStream): emit empty if missing sectors 2018-04-11 17:47:43 +02:00
2 changed files with 4 additions and 2 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "xo-server",
"version": "5.18.1",
"version": "5.18.2",
"license": "AGPL-3.0",
"description": "Server part of Xen-Orchestra",
"keywords": [

View File

@@ -942,7 +942,9 @@ export const createReadStream = asyncIteratorToStream(function * (handler, path)
const vhd = vhds[iVhd]
const isRootVhd = vhd.footer.diskType === HARD_DISK_TYPE_DYNAMIC
if (!vhd.containsBlock(iBlock)) {
if (!isRootVhd) {
if (isRootVhd) {
yield Buffer.alloc((n - i) * VHD_SECTOR_SIZE)
} else {
yield * emitBlockSectors(iVhd + 1, i, n)
}
return