From 3e17ada28b7b73ee19d191a920a2b8c36e5f21e8 Mon Sep 17 00:00:00 2001 From: Observer KRypt0n_ Date: Thu, 25 Nov 2021 22:36:36 +0200 Subject: [PATCH] Added .dmp and .dxvk-cache deletion if option enabled --- README.md | 2 +- src/ts/index.ts | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 45f4aa4..8633c64 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ Download AppImage from [Releases](https://notabug.org/nobody/an-anime-game-launc ### For arch users -This launcher also available as the [an-anime-game-launcher](https://aur.archlinux.org/packages/an-anime-game-launcher) AUR repository +This launcher is also available as the [an-anime-game-launcher](https://aur.archlinux.org/packages/an-anime-game-launcher) AUR repository
diff --git a/src/ts/index.ts b/src/ts/index.ts index 7edcde4..3260be3 100644 --- a/src/ts/index.ts +++ b/src/ts/index.ts @@ -238,8 +238,14 @@ $(() => { if (LauncherLib.getConfig('autodelete_dxvk_logs')) { + const removeExts = [ + '.log', + '.dxvk-cache', + '.dmp' + ]; + fs.readdirSync(constants.gameDir).forEach((file: string) => { - if (path.extname(file) == '.log') + if (removeExts.includes(path.extname(file))) { fs.unlinkSync(path.join(constants.gameDir, file));