From 5b1b0309062b8c5cdd74036a87f11595a8afd135 Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Sun, 7 Feb 2021 18:38:49 -0500 Subject: [PATCH] ImportHandler: Use asynchronous rename instead of `fs.renameSync()` --- src/node/handler/ImportHandler.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/node/handler/ImportHandler.js b/src/node/handler/ImportHandler.js index f5956edcb..d05ea858f 100644 --- a/src/node/handler/ImportHandler.js +++ b/src/node/handler/ImportHandler.js @@ -174,7 +174,7 @@ const doImport = async (req, res, padId) => { // See https://github.com/ether/etherpad-lite/issues/2572 if (fileIsHTML || !useConvertor) { // if no convertor only rename - fs.renameSync(srcFile, destFile); + await fsp_rename(srcFile, destFile); } else { // @TODO - no Promise interface for convertors (yet) await new Promise((resolve, reject) => {