fix: actually assign inputStream

This commit is contained in:
izzy 2025-11-21 17:07:16 +00:00
parent 6cefb9ca95
commit 53ef26a5e4
No known key found for this signature in database
GPG Key ID: 5059F398521BB0F6

View File

@ -201,8 +201,9 @@ export async function restoreBackup(
let inputStream: Readable;
if (backupFilePath.endsWith('.gz')) {
const fileStream = storage.createPlainReadStream(backupFilePath);
const inputStream = storage.createGunzip();
fileStream.pipe(inputStream);
const gunzip = storage.createGunzip();
fileStream.pipe(gunzip);
inputStream = gunzip;
} else {
inputStream = storage.createPlainReadStream(backupFilePath);
}