fix: illegal operation on a directory

This commit is contained in:
Innei
2021-10-01 20:31:42 +08:00
parent e0eba3658d
commit 8a27d4bf76

View File

@@ -94,11 +94,6 @@ export class BackupService {
EventTypes.CONTENT_REFRESH,
'restore_done',
)
} catch (e) {
const logDir = '/tmp/mx-space/log'
mkdirp.sync(logDir)
writeFileSync(logDir, e.message, { encoding: 'utf-8', flag: 'a+' })
throw new InternalServerErrorException(e.message)
} finally {
rmSync(tempDirPath, { recursive: true })
}