mirror of
https://github.com/an-anime-team/an-anime-game-launcher.git
synced 2024-12-30 05:28:15 +03:00
Made DXVK logs deletion option works
This commit is contained in:
parent
3fa259ec64
commit
483d7bd99a
2 changed files with 15 additions and 1 deletions
|
@ -57,7 +57,7 @@
|
|||
await launcher.rpc.stop(true);
|
||||
|
||||
// Remove .tmp files from the temp folder
|
||||
await Neutralino.os.execCommand(`rm -f "${Process.addSlashes(`${tempDir}/*.tmp`)}"`);
|
||||
await Neutralino.os.execCommand(`find "${Process.addSlashes(tempDir)}" -maxdepth 1 -type f -name "*.tmp" -delete`);
|
||||
|
||||
// Save logs
|
||||
const log = Debug.get().join("\r\n");
|
||||
|
|
|
@ -184,6 +184,20 @@ export default (launcher: Launcher): Promise<void> => {
|
|||
launcher.updateDiscordRPC('in-launcher');
|
||||
launcher.tray.hide();
|
||||
|
||||
// Purge DXVK logs
|
||||
Configs.get('purge_dxvk_logs').then(async (purge_logs) => {
|
||||
if (purge_logs)
|
||||
{
|
||||
const gameDir = Process.addSlashes(await constants.paths.gameDir);
|
||||
|
||||
// Delete .log files (e.g. "ZFGameBrowser_xxxx.log")
|
||||
Neutralino.os.execCommand(`find "${gameDir}" -maxdepth 1 -type f -name "*.log" -delete`);
|
||||
|
||||
// Delete .dmp files (e.g. "DumpFile-zfbrowser-xxxxxx.dmp")
|
||||
Neutralino.os.execCommand(`find "${gameDir}" -maxdepth 1 -type f -name "*.dmp" -delete`);
|
||||
}
|
||||
});
|
||||
|
||||
// TODO
|
||||
|
||||
resolve();
|
||||
|
|
Loading…
Reference in a new issue