vdf icon indicating copy to clipboard operation
vdf copied to clipboard

When dumping Paths with double backslash it maintains the double backslash

Open elamhut opened this issue 4 years ago • 2 comments

As title implies when dumping something like:

"DepotBuildConfig" { "DepotID" "123456789" "contentroot" "d:\\NekoNeko\\Build" "FileMapping" { "LocalPath" "" "DepotPath" "." "recursive" "1" } "FileExclusion" ".pdb" }

The path maintains its double backslashes when dumped

elamhut avatar May 12 '21 00:05 elamhut

~~Duplicate of #28~~

rossengeorgiev avatar May 12 '21 17:05 rossengeorgiev

My bad, the other issue with \ as the last character. You can use escaped=False to disable escaping.

>>> print(vdf.dumps({'path': 'd:\\NekoNeko\\Build'}, escaped=False))
"path" "d:\NekoNeko\Build"

rossengeorgiev avatar May 12 '21 17:05 rossengeorgiev