protonscr

Proton 10.0: setup_steam_files never increments the index, causing programs which parse libraryfolders.vdf to break

protonclosed
ValveSoftware/Proton#8899 · opened 2025-07-13 by Umgak · updated 2025-11-14 · 1 comments · github
1 matching comments, n / p to jump
UUmgak 2025-07-13 github

Hello,
The Proton 10 version of the setup_steam_files command fails to increment the index of the library folder when writing libraryfolders.vdf, meaning that every single library folder is given index 0. This breaks programs which parse libraryfolders.vdf, such as https://github.com/soulsmods/ModEngine2.
Tested with GE-Proton10-8, but the version of steam.c is identical to the one in the official repo and the bug is still present there as well.

EDIT: I also tested with the official Proton 10.0-1 (beta) release, and the same exact issue is present.

https://github.com/ValveSoftware/Proton/blob/3a269ab9966409b968c8bc8f3e68bd0d2f42aadf/steam_helper/steam.c#L620-L684

The version of steam.cpp used in Proton 9.0 does not have this issue, as it explicitly uses ++index after writing a line to the buffer.
https://github.com/ValveSoftware/Proton/blob/a62e072e949676917c9f7724bcd34b4e2f8bb53d/steam_helper/steam.cpp#L1472-L1587

To test, the data in $STEAM_COMPAT_DATA_PATH/pfx/drive_c/Program Files (x86)/Steam/steamapps/libraryfolders.vdf should contain the following:

"LibraryFolders"
{
	"0"
	{
		"path"		"Z:\\home\\umgak\\.local\\share\\Steam"
	}
	"1"
	{
		"path"		"Z:\\home\\umgak\\.local\\share\\Steam"
	}
}

On affected versions, it instead contains:

"LibraryFolders"
{
	"0"
	{
		"path"		"Z:\\home\\umgak\\.local\\share\\Steam"
	}
	"0"
	{
		"path"		"Z:\\home\\umgak\\.local\\share\\Steam"
	}
}

Note that the index of the second entry is still 0. This breaks parsers of libraryfolders.vdf and is unexpected behavior based on previous versions and Windows. The fix should be as simple as adding ++index; after the two pos += strappend [...] lines in that function.

UUmgak 2025-11-14 github

Fixed in 10.0-3 - never got a notification about the fix being pushed. Ciao!

Proton versions

Launch options