From d830fa9b130e01d235aad9141139c95e0c23f743 Mon Sep 17 00:00:00 2001 From: Dummerle <44114474+Dummerle@users.noreply.github.com> Date: Sat, 15 Jan 2022 16:44:22 +0100 Subject: [PATCH] Fix empty directory check in install_dialog.py --- rare/components/dialogs/install_dialog.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/rare/components/dialogs/install_dialog.py b/rare/components/dialogs/install_dialog.py index 0a23636a..46ddeb63 100644 --- a/rare/components/dialogs/install_dialog.py +++ b/rare/components/dialogs/install_dialog.py @@ -36,11 +36,9 @@ class InstallDialog(QDialog, Ui_InstallDialog): self.game = self.core.get_game(self.app_name) \ if not self.dl_item.options.overlay \ else Game(app_name=self.app_name, app_title="Epic Overlay") - if not self.dl_item.options.app_name: - self.game_path = self.game.metadata.get('customAttributes', {}). \ - get('FolderName', {}).get('value', self.game.app_name) - else: - self.game_path = "" + + self.game_path = self.game.metadata.get('customAttributes', {}). \ + get('FolderName', {}).get('value', "") self.update = update self.silent = silent @@ -205,7 +203,6 @@ class InstallDialog(QDialog, Ui_InstallDialog): self.options_changed = True self.install_button.setEnabled(False) self.verify_button.setEnabled(not self.worker_running) - # directory is not empty full_path = os.path.join(self.dl_item.options.base_path, self.game_path) if not self.dl_item.options.update and os.path.exists(full_path) and len(os.listdir(full_path)) != 0: