Fixed(?) logs auto-deletion

This commit is contained in:
Observer KRypt0n_ 2022-02-20 19:17:02 +02:00
parent 474364fee1
commit 5d75bd51d6
No known key found for this signature in database
GPG key ID: 844DA47BA25FE1E2

View file

@ -60,7 +60,7 @@
const purge_logs = await Configs.get('purge_logs.launcher') as string|null; const purge_logs = await Configs.get('purge_logs.launcher') as string|null;
if (purge_logs !== null && purge_logs[purge_logs.length - 1] == 'd') if (purge_logs !== null && purge_logs[purge_logs.length - 1] == 'd')
await Neutralino.os.execCommand(`find "${path.addSlashes(launcherDir)}/logs" -maxdepth 1 -mtime ${purge_logs.substring(0, purge_logs.length - 1)} -delete`); await Neutralino.os.execCommand(`find "${path.addSlashes(launcherDir)}/logs" -maxdepth 1 -mtime +${purge_logs.substring(0, purge_logs.length - 1)} -delete`);
// Save logs // Save logs
const log = Debug.get().join('\r\n'); const log = Debug.get().join('\r\n');