Browse Source

use finished

reiji-h 1 year ago
parent
commit
cfd4dbe3d2
1 changed files with 1 additions and 1 deletions
  1. 1 1
      apps/app/src/server/service/export.js

+ 1 - 1
apps/app/src/server/service/export.js

@@ -355,7 +355,7 @@ class ExportService {
     // finalize the archive (ie we are done appending files but streams have to finish yet)
     // finalize the archive (ie we are done appending files but streams have to finish yet)
     // 'close', 'end' or 'finish' may be fired right after calling this method so register to them beforehand
     // 'close', 'end' or 'finish' may be fired right after calling this method so register to them beforehand
     archive.finalize();
     archive.finalize();
-    await stream;
+    await finished(stream);
 
 
     logger.info(`zipped GROWI data into ${zipFile} (${archive.pointer()} bytes)`);
     logger.info(`zipped GROWI data into ${zipFile} (${archive.pointer()} bytes)`);