Fix empty directory check in install_dialog.py
This commit is contained in:
parent
45163eafb5
commit
d830fa9b13
1 changed files with 3 additions and 6 deletions
|
@ -36,11 +36,9 @@ class InstallDialog(QDialog, Ui_InstallDialog):
|
||||||
self.game = self.core.get_game(self.app_name) \
|
self.game = self.core.get_game(self.app_name) \
|
||||||
if not self.dl_item.options.overlay \
|
if not self.dl_item.options.overlay \
|
||||||
else Game(app_name=self.app_name, app_title="Epic 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', {}). \
|
self.game_path = self.game.metadata.get('customAttributes', {}). \
|
||||||
get('FolderName', {}).get('value', self.game.app_name)
|
get('FolderName', {}).get('value', "")
|
||||||
else:
|
|
||||||
self.game_path = ""
|
|
||||||
|
|
||||||
self.update = update
|
self.update = update
|
||||||
self.silent = silent
|
self.silent = silent
|
||||||
|
@ -205,7 +203,6 @@ class InstallDialog(QDialog, Ui_InstallDialog):
|
||||||
self.options_changed = True
|
self.options_changed = True
|
||||||
self.install_button.setEnabled(False)
|
self.install_button.setEnabled(False)
|
||||||
self.verify_button.setEnabled(not self.worker_running)
|
self.verify_button.setEnabled(not self.worker_running)
|
||||||
|
|
||||||
# directory is not empty
|
# directory is not empty
|
||||||
full_path = os.path.join(self.dl_item.options.base_path, self.game_path)
|
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:
|
if not self.dl_item.options.update and os.path.exists(full_path) and len(os.listdir(full_path)) != 0:
|
||||||
|
|
Loading…
Reference in a new issue