GameFinder icon indicating copy to clipboard operation
GameFinder copied to clipboard

GameFinder fails to parse Steam Manifest if there is a quotation mark used in a drive label

Open 2KDrop opened this issue 1 year ago • 1 comments

As title says, when a drive for a Steam library is labelled with a " in the name, such as Game Drive 3.5" it will fail to parse the file.

Renaming the drive in the Steam drive menu to not include the " solves the issue as a bandaid solution

Example from the libraryfolders.vdf file

	"path"		"F:\\Games\\Steam"
	"label"		"Game Drive 3.5\""
	"contentid"		"2288888475556474100"
	"totalsize"		"1000191553536"

Renaming the drive in steam to no longer include the " turns it to this

	"path"		"F:\\Games\\Steam"
	"label"		"Game Drive 3.5"
	"contentid"		"2288888475556474100"
	"totalsize"		"1000191553536"

Which can be read no issue

2KDrop avatar Feb 16 '24 00:02 2KDrop

It looks like this is an issue with ValveKeyValue, which GameFinder uses to deserialize Steam's various files. Steam can apparently be a little wonky in its handling of escape sequences, and ValveKeyValue attempts to faithfully reproduce the wonkiness. Note if the quotation marks are matched (i.e., there is an even number of them), the exception does not occur.

@erri120 : It's kind of a workaround, but if I add a KVSerializerOptions with "{ HasEscapeSequences = true }" on the .Deserialize() call on line 38 of LibraryFoldersManifestParser, then the exception doesn't happen.

Nutzzz avatar Mar 11 '24 22:03 Nutzzz