Skip to content

Commit

Permalink
New libraryfolders.vdf format: Consider 'mounted' flag
Browse files Browse the repository at this point in the history
  • Loading branch information
akorb committed Jun 20, 2021
1 parent a72c85c commit 622dac1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions SteamShutdown/Steam.cs
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,13 @@ private static string[] GetLibraryPaths(string installationPath)

if (pathNode.ContainsKey("path"))
{
// New format

// If a library folder is removed in the Steam settings, the path persists, but its 'mounted' value is set to 0 (disabled)
// We consider only the value '1' as that the path is actually enabled.
if (pathNode["mounted"].ToString() != "1")
continue;

// Valve introduced a new format for the "libraryfolders.vdf" file
// In the new format, the node "1" not only contains a single value (the path),
// but multiple values: path, label, mounted, contentid
Expand Down

0 comments on commit 622dac1

Please sign in to comment.