mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
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:
commit
f165131647
1 changed files with 1 additions and 1 deletions
|
@ -39,7 +39,7 @@ const cacheDump = setInterval(function() {
|
||||||
return fs.writeFile(cacheFsPathTmp, dump, function(err) {
|
return fs.writeFile(cacheFsPathTmp, dump, function(err) {
|
||||||
if (err != null) {
|
if (err != null) {
|
||||||
logger.log(OError.tag(err, 'error writing cache file'))
|
logger.log(OError.tag(err, 'error writing cache file'))
|
||||||
return fs.unlink(cacheFsPathTmp)
|
fs.unlink(cacheFsPathTmp, () => {})
|
||||||
} else {
|
} else {
|
||||||
fs.rename(cacheFsPathTmp, cacheFsPath, err => {
|
fs.rename(cacheFsPathTmp, cacheFsPath, err => {
|
||||||
if (err) {
|
if (err) {
|
||||||
|
|
Loading…
Reference in a new issue