Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix] Delete runner configurations when resetting heroic #4033

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions public/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
},
"reset-heroic": {
"question": {
"message": "Are you sure you want to reset Heroic? This will remove all Settings and Caching but won't remove your Installed games or your Epic credentials. Portable versions (AppImage, WinPortable, ...) of heroic needs to be restarted manually afterwards.",
"message": "Are you sure you want to reset Heroic? This will remove all Settings and Caching. Portable versions (AppImage, WinPortable, ...) of heroic needs to be restarted manually afterwards.",
"title": "Reset Heroic"
}
},
Expand Down Expand Up @@ -765,7 +765,7 @@
},
"details": "Details",
"resetHeroic": {
"help": "This will remove all Settings and Caching but won't remove your Installed games or your Epic credentials. Portable versions (AppImage, WinPortable, ...) of heroic needs to be restarted manually afterwards."
"help": "This will remove all Settings and Caching. Portable versions (AppImage, WinPortable, ...) of heroic needs to be restarted manually afterwards."
},
"title": {
"clearCache": "Clear Cache",
Expand Down
13 changes: 11 additions & 2 deletions src/backend/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ import {
GITHUB_API,
isMac,
configStore,
isLinux
isLinux,
legendaryConfigPath,
gogdlConfigPath,
nileConfigPath
} from './constants'
import {
appendGamePlayLog,
Expand Down Expand Up @@ -414,7 +417,13 @@ function clearCache(
}

function resetHeroic() {
const appFolders = [gamesConfigPath, configPath]
const appFolders = [
gamesConfigPath,
configPath,
legendaryConfigPath,
gogdlConfigPath,
nileConfigPath
]
appFolders.forEach((folder) => {
rmSync(folder, { recursive: true, force: true })
})
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/screens/Settings/components/ResetHeroic.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const ResetHeroic = () => {
<InfoBox text={t('settings.advanced.details', 'Details')}>
{t(
'settings.advanced.resetHeroic.help',
"This will remove all Settings and Caching but won't remove your Installed games or your Epic credentials. Portable versions (AppImage, WinPortable, ...) of heroic needs to be restarted manually afterwards."
'This will remove all Settings and Caching. Portable versions (AppImage, WinPortable, ...) of heroic needs to be restarted manually afterwards.'
)}
</InfoBox>
<button className="button is-footer is-danger" onClick={showResetDialog}>
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/state/GlobalState.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ class GlobalState extends PureComponent<Props> {
title: t('box.reset-heroic.question.title', 'Reset Heroic'),
message: t(
'box.reset-heroic.question.message',
"Are you sure you want to reset Heroic? This will remove all Settings and Caching but won't remove your Installed games or your Epic credentials. Portable versions (AppImage, WinPortable, ...) of heroic needs to be restarted manually afterwards."
'Are you sure you want to reset Heroic? This will remove all Settings and Caching. Portable versions (AppImage, WinPortable, ...) of heroic needs to be restarted manually afterwards.'
),
buttons: [
{ text: t('box.yes'), onClick: window.api.resetHeroic },
Expand Down
Loading