fix: actually assign inputStream

This commit is contained in:
izzy
2025-11-21 17:07:16 +00:00
parent 6cefb9ca95
commit 53ef26a5e4

View File

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