mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Added safety checks to the SteamHandler
This commit is contained in:
parent
75b68e4095
commit
86d91a3e4b
@ -92,7 +92,8 @@ namespace Wabbajack.Common
|
||||
if (!l.Contains("BaseInstallFolder_")) return;
|
||||
var s = GetVdfValue(l);
|
||||
s = Path.Combine(s, "steamapps");
|
||||
paths.Add(s);
|
||||
if(Directory.Exists(s))
|
||||
paths.Add(s);
|
||||
});
|
||||
|
||||
// Default path in the Steam folder isn't in the configs
|
||||
@ -111,7 +112,7 @@ namespace Wabbajack.Common
|
||||
|
||||
InstallFolders.Do(p =>
|
||||
{
|
||||
Directory.EnumerateFiles(p, "*.acf", SearchOption.TopDirectoryOnly).Do(f =>
|
||||
Directory.EnumerateFiles(p, "*.acf", SearchOption.TopDirectoryOnly).Where(File.Exists).Do(f =>
|
||||
{
|
||||
var steamGame = new SteamGame();
|
||||
var valid = false;
|
||||
@ -157,7 +158,7 @@ namespace Wabbajack.Common
|
||||
if(!Directory.Exists(workshop))
|
||||
return;
|
||||
|
||||
Directory.EnumerateFiles(workshop, "*.acf", SearchOption.TopDirectoryOnly).Do(f =>
|
||||
Directory.EnumerateFiles(workshop, "*.acf", SearchOption.TopDirectoryOnly).Where(File.Exists).Do(f =>
|
||||
{
|
||||
if (Path.GetFileName(f) != $"appworkshop_{game.AppId}.acf")
|
||||
return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user