mirror of
https://github.com/finos/SymphonyElectron.git
synced 2025-02-25 18:55:29 -06:00
SDA-1885 Javascript Error on cleaning logs (#923)
This commit is contained in:
parent
873badf389
commit
165320d83f
@ -250,7 +250,7 @@ class Logger {
|
||||
const filePath = path.join(this.logPath, file);
|
||||
const stat = fs.statSync(filePath);
|
||||
const fileTimestamp = new Date(util.inspect(stat.mtime)).getTime();
|
||||
if (fileTimestamp < deleteTimeStamp) {
|
||||
if ((fileTimestamp < deleteTimeStamp) && fs.existsSync(filePath)) {
|
||||
fs.unlinkSync(filePath);
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user