fix(writer): Fix verify size for unaligned images (#1868)

Change-Type: patch
This commit is contained in:
Jonas Hermsmeier 2017-11-20 19:28:20 +01:00 committed by GitHub
parent 500af07689
commit ecedff2cdf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -260,7 +260,11 @@ class ImageWriter extends EventEmitter {
_createVerifyPipeline (options) {
const pipeline = new Pipage()
const size = options.image.size.final.estimation ? this.bytesWritten : options.image.size.final.value
let size = this.bytesWritten
if (!options.image.size.final.estimation) {
size = Math.max(this.bytesWritten, options.image.size.final.value)
}
const progressStream = new ProgressStream({
length: size,