mirror of
https://github.com/EpicMorg/SteamPathsLib.git
synced 2024-12-29 07:55:31 +03:00
commit
ac26ae83e9
@ -85,15 +85,25 @@
|
||||
|
||||
libraryPaths.Add(Path.Combine(steamPath, "steamapps"));
|
||||
|
||||
dynamic configObject = VdfConvert.Deserialize(File.ReadAllText(configPath)).Value;
|
||||
var configLibraryPaths = ((VObject)configObject.Software.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"));
|
||||
try {
|
||||
dynamic configObject = VdfConvert.Deserialize(File.ReadAllText(configPath)).Value;
|
||||
dynamic valve;
|
||||
|
||||
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();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user