From 5cfd92cf8554cfdad6ac4dc76af4f91d03e81955 Mon Sep 17 00:00:00 2001 From: Jakob Ackermann Date: Mon, 21 Oct 2019 01:54:59 +0200 Subject: [PATCH] [ASpell] error handling of cache dump: fix an async fs function call fs.unlink requires a callback as second parameter. Signed-off-by: Jakob Ackermann --- services/spelling/app/js/ASpell.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/spelling/app/js/ASpell.js b/services/spelling/app/js/ASpell.js index 67b37c54f9..d6ec30dcf1 100644 --- a/services/spelling/app/js/ASpell.js +++ b/services/spelling/app/js/ASpell.js @@ -39,7 +39,7 @@ const cacheDump = setInterval(function() { return fs.writeFile(cacheFsPathTmp, dump, function(err) { if (err != null) { logger.log(OError.tag(err, 'error writing cache file')) - return fs.unlink(cacheFsPathTmp) + fs.unlink(cacheFsPathTmp, () => {}) } else { fs.rename(cacheFsPathTmp, cacheFsPath, err => { if (err) {