Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ArgumentException when GOG game has no EXE path specified #23

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Tudzer
Copy link

@Tudzer Tudzer commented Nov 11, 2023

I've encountered a case when GOG game registry entry (Cyberpank 2077 - EP1) has no executable path specified, as it's not a base game. The plugin uses string.Empty as default values when some registry value is not specified, but string.Empty is not a valid argument for Path.GetDirectoryName and will lead to unhandled ArgumentException being thrown by NormalizePath method.

@Tudzer
Copy link
Author

Tudzer commented Nov 11, 2023

Here is a full dump of that registry entry in case you are interested:

[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\GOG.com\Games\1256837418]
"gameName"="Cyberpunk 2077 - EP1"
"gameID"="1256837418"
"productID"="1256837418"
"language"="english"
"lang_code"="en-US"
"path"="C:\\Games\\Cyberpunk 2077"
"startMenu"="Cyberpunk 2077 - EP1"
"ver"="2.0_PhL"
"uninstallCommand"="C:\\Games\\Cyberpunk 2077\\unins001.exe"
"dependsOn"="1423049311"
"supportLink"=""
"BUILDID"="56896837368890911"
"INSTALLDATE"="2023-09-27 15:18:00"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant