backup size: display stats correctly
This commit is contained in:
@@ -169,12 +169,14 @@ async function tarPack(dataLayout, encryption, uploader, progressCallback) {
|
||||
|
||||
const [error] = await pipeline; // already wrapped in safe()
|
||||
if (error) throw new BoxError(BoxError.EXTERNAL_ERROR, `tarPack pipeline error: ${error.message}`);
|
||||
debug(`tarPack: pipeline finished: ${JSON.stringify(ps.stats())}`);
|
||||
|
||||
const stats = ps.stats();
|
||||
debug(`tarPack: pipeline finished: ${JSON.stringify(stats)}`);
|
||||
|
||||
await uploader.finish();
|
||||
return {
|
||||
stats: { fileCount, ...ps.stats() },
|
||||
integrity: { size: ps.stats().transferred, fileCount, sha256: hash.digest('hex') }
|
||||
stats: { fileCount, size: stats.transferred, ...stats },
|
||||
integrity: { size: stats.transferred, fileCount, sha256: hash.digest('hex') }
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user