vdf icon indicating copy to clipboard operation
vdf copied to clipboard

Fails to parse gameinfo.txt files

Open InevitablyDivinity opened this issue 2 years ago • 0 comments

Attempting to parse a Source 2013 gameinfo.txt file will fail due to '+' characters in some of the subkeys in the SearchPaths key. Here's an example from Team Fortress 2's gameinfo.txt:

"SearchPaths"
{

	// First, mount all user customizations.  This will search for VPKs and subfolders
	// and mount them in alphabetical order.  The easiest way to distribute a mod is to
	// pack up the custom content into a VPK.  To "install" a mod, just drop it in this
	// folder.
	//
	// Note that this folder is scanned only when the game is booted.
	"game+mod+custom_mod"	"tf/custom/*"

Here, the parser should at least be capable of registering game+mod+custom_mod as a key, but ideally it should separate it into 3 keys for ease-of-use, like so: { "game": "tf/custom/*", "mod": "tf/custom/*", "custom_mod": "tf/custom/*" }

InevitablyDivinity avatar Sep 11 '22 04:09 InevitablyDivinity