chore(xo-mixins/backup): use default value for remote handler flags

This commit is contained in:
Julien Fontanet 2016-05-05 18:21:59 +02:00
parent 3b13bcb098
commit 8f8c6366e3

View File

@ -391,8 +391,7 @@ export default class {
// The problem is in the merge case, a delta merged in a full vdi
// backup forces us to browse the resulting file =>
// Significant transfer time on the network !
checksum: !isFull,
flags: 'wx'
checksum: !isFull
})
stream.on('error', error => targetStream.emit('error', error))
@ -546,7 +545,7 @@ export default class {
$onFailure(() => handler.unlink(infoPath)::pCatch(noop))
// Write Metadata.
await handler.outputFile(infoPath, JSON.stringify(delta, null, 2), {flag: 'wx'})
await handler.outputFile(infoPath, JSON.stringify(delta, null, 2))
// Here we have a completed backup. We can merge old vdis.
await Promise.all(
@ -627,7 +626,7 @@ export default class {
}
async _backupVm (vm, handler, file, {compress, onlyMetadata}) {
const targetStream = await handler.createOutputStream(file, { flags: 'wx' })
const targetStream = await handler.createOutputStream(file)
const promise = eventToPromise(targetStream, 'finish')
const sourceStream = await this._xo.getXapi(vm).exportVm(vm._xapiId, {