From 01ec2ccd892aceb0142c815d2e93cb0be086ab2f Mon Sep 17 00:00:00 2001 From: derrod Date: Sat, 11 Dec 2021 16:34:07 +0100 Subject: [PATCH] [cli] Error out if no game files are found, suggest corrected path --- legendary/cli.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/legendary/cli.py b/legendary/cli.py index 4ef4df8..6ff2eb1 100644 --- a/legendary/cli.py +++ b/legendary/cli.py @@ -1137,8 +1137,15 @@ class LegendaryCLI: for f in manifest.file_manifest_list.elements) ratio = found / total - if not found and game.is_dlc: - logger.info(f'DLC "{game.app_title}" ("{game.app_name}") does not appear to be installed.') + if not found: + logger.error(f'No files belonging to {"DLC" if game.is_dlc else "Game"} "{game.app_title}" ' + f'({game.app_name}) found in the specified location, please verify that the path is correct.') + if not game.is_dlc: + # check if game folder is in path, suggest alternative + folder = game.metadata.get('customAttributes', {}).get('FolderName', {}).get('value', game.app_name) + if folder and folder not in args.app_path: + new_path = os.path.join(args.app_path, folder) + logger.info(f'Did you mean "{new_path}"?') return if not game.is_dlc and not os.path.exists(exe_path) and not args.disable_check: