Added .dmp and .dxvk-cache deletion if option enabled

This commit is contained in:
Observer KRypt0n_ 2021-11-25 22:36:36 +02:00
parent 235a827642
commit 3e17ada28b
No known key found for this signature in database
GPG key ID: DC5D4EC1303465DA
2 changed files with 8 additions and 2 deletions

View file

@ -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
<br>

View file

@ -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));