Skip to content

Commit

Permalink
fix following review 1
Browse files Browse the repository at this point in the history
  • Loading branch information
fbeauchamp committed Nov 14, 2022
1 parent 9395c45 commit e30bfc8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

> Users must be able to say: “Nice enhancement, I'm eager to test it”
- [Ova export] speed up ova generation by 2. Generated file will be bigger ( as big as non compressed xva) (PR [#6487](https://github.com/vatesfr/xen-orchestra/pull/6487))
- [OVA export] Speed up OVA generation by 2. Generated file will be bigger (as big as uncompressed XVA) (PR [#6487](https://github.com/vatesfr/xen-orchestra/pull/6487))

### Bug fixes

Expand Down
12 changes: 6 additions & 6 deletions packages/xo-vmdk-to-vhd/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ export async function computeVmdkLength(diskName, vhdReadStream) {
export async function vhdToVMDK(diskName, vhdReadStreamGetter, withLength = false) {
const { iterator, size } = await vhdToVMDKIterator(diskName, await vhdReadStreamGetter())
let length
if (size === undefined) {
length = await computeVmdkLength(diskName, await vhdReadStreamGetter())
} else {
length = size
}
const stream = await asyncIteratorToStream(iterator)
if (withLength) {
if(withLength){
if (size === undefined) {
length = await computeVmdkLength(diskName, await vhdReadStreamGetter())
} else {
length = size
}
stream.length = length
}
return stream
Expand Down
2 changes: 1 addition & 1 deletion packages/xo-vmdk-to-vhd/src/vmdk-generate.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ ddb.geometry.cylinders = "${geometry.cylinders}"
remaining -= SECTOR_SIZE // MARKER_EOS

if (remaining < 0) {
throw new Error('vmdk is smaller than precalculed size ')
throw new Error('vmdk is bigger than precalculed size ')
}
const size = 1024 * 1024
while (remaining > 0) {
Expand Down

0 comments on commit e30bfc8

Please sign in to comment.