Merge pull request #9 from EpicMorg/develop

Develop
This commit is contained in:
Alex_Z 2020-06-10 23:32:36 +03:00 committed by GitHub
commit ac26ae83e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -85,15 +85,25 @@
libraryPaths.Add(Path.Combine(steamPath, "steamapps")); libraryPaths.Add(Path.Combine(steamPath, "steamapps"));
dynamic configObject = VdfConvert.Deserialize(File.ReadAllText(configPath)).Value; try {
var configLibraryPaths = ((VObject)configObject.Software.Valve.Steam) dynamic configObject = VdfConvert.Deserialize(File.ReadAllText(configPath)).Value;
.Children() dynamic valve;
.Where(item => item.Key.StartsWith("BaseInstallFolder"))
.Select(item => item.Value.ToString())
.Select(line => new DirectoryInfo(line).FullName)
.Select(line => Path.Combine(line, "steamapps"));
libraryPaths.AddRange(configLibraryPaths); try {
valve = configObject.Software.Valve;
} catch {
valve = configObject.Software.valve;
}
var configLibraryPaths = ((VObject)valve.Steam)
.Children()
.Where(item => item.Key.StartsWith("BaseInstallFolder"))
.Select(item => item.Value.ToString())
.Select(line => new DirectoryInfo(line).FullName)
.Select(line => Path.Combine(line, "steamapps"));
libraryPaths.AddRange(configLibraryPaths);
} catch { }
result.SteamLibraryFolders = libraryPaths.ToArray(); result.SteamLibraryFolders = libraryPaths.ToArray();