Skip to content

Commit

Permalink
Fixes #19 #17
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew committed Jan 16, 2016
1 parent e7eda2d commit 85deefc
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 7 deletions.
7 changes: 6 additions & 1 deletion SteamCleaner/Clients/Steam.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using System.IO;
using System.Linq;
using System.Text.RegularExpressions;
using MaterialDesignThemes.Wpf;
using Microsoft.Win32;

#endregion
Expand Down Expand Up @@ -61,11 +62,15 @@ public static int CountOccurences(string needle, string haystack)

public static List<string> GetSecondarySteamInstallPaths()
{
var paths = new List<string>();
var configPath = GetSteamPath() + "\\config\\config.vdf";
if (!File.Exists(configPath))
{
return paths;
}
var data = File.ReadAllText(configPath);
var numberOfInstallPaths = CountOccurences("BaseInstallFolder", data);
var dataArray = File.ReadAllLines(configPath);
var paths = new List<string>();
for (var i = 0; i < numberOfInstallPaths; i++)
{
var slot = i + 1;
Expand Down
6 changes: 4 additions & 2 deletions SteamCleaner/MainWindowViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@

using System.Collections.ObjectModel;
using System.ComponentModel;
using System.IO;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Windows.Input;
using SquaredInfinity.Foundation.Extensions;
using SteamCleaner.Clients;
using SteamCleaner.Utilities;

Expand Down Expand Up @@ -57,8 +59,8 @@ private void RunRefresh()
//needs to be called to ensure we aren't loading a previously stored object.
CleanerUtilities.updateRedistributables = true;
_pathsInternal.Clear();
foreach (var steamPath in Steam.SteamPaths())
_pathsInternal.Add(steamPath);
var steamPaths = Steam.SteamPaths();
_pathsInternal.AddRange(steamPaths.Select(steamPath => Steam.FixPath(steamPath)).Where(path => Directory.Exists(path)).ToList());
if (Gog.Exisit())
{
_pathsInternal.Add("GoG Games Detected");
Expand Down
4 changes: 2 additions & 2 deletions SteamCleaner/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,5 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]

[assembly: AssemblyVersion("1.7.0.0")]
[assembly: AssemblyFileVersion("1.7.0.0")]
[assembly: AssemblyVersion("1.9.0.0")]
[assembly: AssemblyFileVersion("1.9.0.0")]
2 changes: 1 addition & 1 deletion SteamCleaner/Utilities/CleanerUtilities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public static List<Redistributables> FindRedistributables()
return cachedRedistributables;
}
var steamPaths = Steam.SteamPaths();
var crawlableDirs = steamPaths.Select(Steam.FixPath).Where(Directory.Exists).ToList();
var crawlableDirs = steamPaths.Select(steamPath => Steam.FixPath(steamPath)).Where(path => Directory.Exists(path)).ToList();
var gameDirs =
crawlableDirs.Select(Directory.GetDirectories).SelectMany(directories => directories).ToList();
if (Gog.Exisit())
Expand Down
2 changes: 1 addition & 1 deletion version.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<steamcleaner>
<version>1.8</version>
<version>1.9</version>
<url>https://github.com/Codeusa/SteamCleaner/releases/latest</url>
</steamcleaner>

0 comments on commit 85deefc

Please sign in to comment.