From 6225caabaf571d80456c3f7423066acd03835a2c Mon Sep 17 00:00:00 2001 From: Timothy Baldridge Date: Thu, 14 May 2020 16:28:25 -0600 Subject: [PATCH 1/2] Fix for absolute path in Steam game files --- CHANGELOG.md | 1 + .../StoreHandlers/SteamHandler.cs | 19 ++++++++++++++++--- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5780931a..45ce8dd4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ * Make the CDN downloads multi-threaded * Optimize installation of included files * Reinstate a broken feature with disabled mods +* Fix for Absolute Paths in Steam files #### Version - 2.0.4.4 - 5/11/2020 * BA2s store file names as UTF8 instead of UTF7 diff --git a/Wabbajack.Common/StoreHandlers/SteamHandler.cs b/Wabbajack.Common/StoreHandlers/SteamHandler.cs index 236adb59..7a8d9fdf 100644 --- a/Wabbajack.Common/StoreHandlers/SteamHandler.cs +++ b/Wabbajack.Common/StoreHandlers/SteamHandler.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.IO; using System.Linq; using System.Security; using Microsoft.Win32; @@ -155,9 +156,21 @@ namespace Wabbajack.Common.StoreHandlers if (!l.ContainsCaseInsensitive("\"installdir\"")) return; - var path = new RelativePath("common").Combine(GetVdfValue(l)).RelativeTo(u); - if (path.Exists) - game.Path = path; + var value = GetVdfValue(l); + AbsolutePath absPath; + + if (Path.IsPathRooted(value)) + { + absPath = (AbsolutePath)value; + } + else + { + absPath = new RelativePath("common").Combine(GetVdfValue(l)).RelativeTo(u); + } + + if (absPath.Exists) + game.Path = absPath; + }); if (!gotID || !game.Path.IsDirectory) return; From 4a94bdbef2ee3f59410f15f7d8aa9f78240ccab2 Mon Sep 17 00:00:00 2001 From: Timothy Baldridge Date: Thu, 14 May 2020 16:28:45 -0600 Subject: [PATCH 2/2] Bump release date --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 45ce8dd4..dc7e2f6e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ ### Changelog -#### Version - 2.0.5.0 - 5/13/2020 +#### Version - 2.0.5.0 - 5/14/2020 * Make the CDN downloads multi-threaded * Optimize installation of included files * Reinstate a broken feature with disabled mods