ImportHandler: Use asynchronous rename instead of `fs.renameSync()`
parent
c7b1abebe4
commit
5b1b030906
|
@ -174,7 +174,7 @@ const doImport = async (req, res, padId) => {
|
||||||
// See https://github.com/ether/etherpad-lite/issues/2572
|
// See https://github.com/ether/etherpad-lite/issues/2572
|
||||||
if (fileIsHTML || !useConvertor) {
|
if (fileIsHTML || !useConvertor) {
|
||||||
// if no convertor only rename
|
// if no convertor only rename
|
||||||
fs.renameSync(srcFile, destFile);
|
await fsp_rename(srcFile, destFile);
|
||||||
} else {
|
} else {
|
||||||
// @TODO - no Promise interface for convertors (yet)
|
// @TODO - no Promise interface for convertors (yet)
|
||||||
await new Promise((resolve, reject) => {
|
await new Promise((resolve, reject) => {
|
||||||
|
|
Loading…
Reference in New Issue