@@ -209,8 +209,8 @@ export default class RemoteHandlerAbstract {
|
||||
|
||||
// write a stream to a file using a temporary file
|
||||
async outputStream(
|
||||
input: Readable | Promise<Readable>,
|
||||
path: string,
|
||||
input: Readable | Promise<Readable>,
|
||||
{ checksum = true, dirMode }: { checksum?: boolean, dirMode?: number } = {}
|
||||
): Promise<void> {
|
||||
path = normalizePath(path)
|
||||
@@ -477,7 +477,7 @@ export default class RemoteHandlerAbstract {
|
||||
return this._outputFile(file, data, { flags })
|
||||
}
|
||||
|
||||
async _outputStream(input: Readable, path: string, { checksum, dirMode }: { checksum?: boolean, dirMode?: number }) {
|
||||
async _outputStream(path: string, input: Readable, { checksum, dirMode }: { checksum?: boolean, dirMode?: number }) {
|
||||
const tmpPath = `${dirname(path)}/.${basename(path)}`
|
||||
const output = await this.createOutputStream(tmpPath, {
|
||||
checksum,
|
||||
|
||||
@@ -1374,7 +1374,7 @@ export default class BackupNg {
|
||||
parentId: taskId,
|
||||
result: () => ({ size: xva.size }),
|
||||
},
|
||||
handler.outputStream(fork, dataFilename, {
|
||||
handler.outputStream(dataFilename, fork, {
|
||||
dirMode,
|
||||
})
|
||||
)
|
||||
@@ -1712,7 +1712,7 @@ export default class BackupNg {
|
||||
}
|
||||
|
||||
// FIXME: should only be renamed after the metadata file has been written
|
||||
await handler.outputStream(fork.streams[`${id}.vhd`](), path, {
|
||||
await handler.outputStream(path, fork.streams[`${id}.vhd`](), {
|
||||
// no checksum for VHDs, because they will be invalidated by
|
||||
// merges and chainings
|
||||
checksum: false,
|
||||
|
||||
Reference in New Issue
Block a user