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.
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.
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.vdfshould contain the following:On affected versions, it instead contains:
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 twopos += strappend [...]lines in that function.