mirror of
https://github.com/finos/SymphonyElectron.git
synced 2026-07-29 23:57:56 -05:00
Merge branch 'master' into SDA-2824-Set-Notif-Pos-Darkmode
This commit is contained in:
@@ -251,10 +251,12 @@ class Logger {
|
||||
const deleteTimeStamp = new Date().getTime() - (5 * 24 * 60 * 60 * 1000);
|
||||
files.forEach((file) => {
|
||||
const filePath = path.join(this.logPath, file);
|
||||
const stat = fs.statSync(filePath);
|
||||
const fileTimestamp = new Date(util.inspect(stat.mtime)).getTime();
|
||||
if ((fileTimestamp < deleteTimeStamp) && fs.existsSync(filePath)) {
|
||||
fs.unlinkSync(filePath);
|
||||
if (fs.existsSync(filePath)) {
|
||||
const stat = fs.statSync(filePath);
|
||||
const fileTimestamp = new Date(util.inspect(stat.mtime)).getTime();
|
||||
if ((fileTimestamp < deleteTimeStamp)) {
|
||||
fs.unlinkSync(filePath);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user