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

Parsing failure when value ends with a backslash #28

Open
junhochoi-gamedev opened this issue Jun 10, 2020 · 1 comment
Open

Parsing failure when value ends with a backslash #28

junhochoi-gamedev opened this issue Jun 10, 2020 · 1 comment
Labels

Comments

@junhochoi-gamedev
Copy link

Parsing fails even with Escaped=False.
vdf.load(open('test.vdf'), merge_duplicate_keys=False, escaped=False)

test.vdf contents:

"ParentKey1"
{
	"ValueKey1"	".\path\"
	"ParentKey2"
	{
		"ValueKey2" "2"
	}
}

Output
SyntaxError: vdf.parse: one too many closing parenthasis

Also see examples from Valve documentation
https://partner.steamgames.com/doc/sdk/uploading
under headings "Depot Build Script" and "App Build Script"

@rossengeorgiev
Copy link
Member

Generally, VDF supports \ for escapes, but that doesn't look to be the case for those files. File paths on Windows, like the ones in the examples, cannot have ", so escaping is pointless there. There is Desc key, but that probably break if there is " in the value, unless it just ignored. This must be special variation of valve's KVs.

To support this, there will need to be a parameter to disable escaping in load/dump

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

No branches or pull requests

2 participants