Merge pull request #62 from overleaf/jpa-import-37

[ASpell] error handling of cache dump: fix an async fs function call
This commit is contained in:
Jakob Ackermann 2020-07-20 11:44:42 +02:00 committed by GitHub
commit f165131647

View file

@ -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) {