mirror of
https://github.com/derrod/legendary.git
synced 2024-12-22 01:45:28 +00:00
[cli] Error out if no game files are found, suggest corrected path
This commit is contained in:
parent
797598322d
commit
01ec2ccd89
|
@ -1137,8 +1137,15 @@ class LegendaryCLI:
|
||||||
for f in manifest.file_manifest_list.elements)
|
for f in manifest.file_manifest_list.elements)
|
||||||
ratio = found / total
|
ratio = found / total
|
||||||
|
|
||||||
if not found and game.is_dlc:
|
if not found:
|
||||||
logger.info(f'DLC "{game.app_title}" ("{game.app_name}") does not appear to be installed.')
|
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
|
return
|
||||||
|
|
||||||
if not game.is_dlc and not os.path.exists(exe_path) and not args.disable_check:
|
if not game.is_dlc and not os.path.exists(exe_path) and not args.disable_check:
|
||||||
|
|
Loading…
Reference in a new issue