1
0
Fork 0
mirror of synced 2024-06-23 08:40:45 +12:00

Do not remove config, when deleting a game, but keep files

This commit is contained in:
Dummerle 2022-07-01 17:42:41 +02:00
parent 93c732401c
commit 2f43431589
No known key found for this signature in database
GPG key ID: AB68CC59CA39F2F1

View file

@ -1,13 +1,12 @@
import os
import platform
import shutil
from logging import getLogger
from PyQt5.QtCore import pyqtSignal, QCoreApplication, QObject, QRunnable, QStandardPaths
from legendary.core import LegendaryCore
from legendary.models.game import VerifyResult
from legendary.utils.lfs import validate_files
from rare.shared import LegendaryCoreSingleton
from rare.utils import config_helper
@ -59,12 +58,12 @@ def uninstall(app_name: str, core: LegendaryCore, options=None):
logger.warning(
f"Removing game failed: {e!r}, please remove {igame.install_path} manually."
)
if not options["keep_files"]:
logger.info("Removing sections in config file")
config_helper.remove_section(app_name)
config_helper.remove_section(f"{app_name}.env")
logger.info("Removing sections in config file")
config_helper.remove_section(app_name)
config_helper.remove_section(f"{app_name}.env")
config_helper.save_config()
config_helper.save_config()
def update_manifest(app_name: str, core: LegendaryCore):