From 34e3b1bcfa9c34ef6d949d6e68b9fcc7d56510fb Mon Sep 17 00:00:00 2001 From: erri120 Date: Mon, 24 Feb 2020 16:24:13 +0100 Subject: [PATCH] Changed the VFSCache location MO2: - uses the hash of the path to ModOrganizer.exe Vortex: - uses the hash of the Staging path --- Wabbajack.Lib/ACompiler.cs | 3 ++- Wabbajack.Lib/MO2Compiler.cs | 4 ++++ Wabbajack.Lib/VortexCompiler.cs | 4 ++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Wabbajack.Lib/ACompiler.cs b/Wabbajack.Lib/ACompiler.cs index 02cf854b..3d5a1936 100644 --- a/Wabbajack.Lib/ACompiler.cs +++ b/Wabbajack.Lib/ACompiler.cs @@ -22,7 +22,8 @@ namespace Wabbajack.Lib public bool ReadmeIsWebsite; public string WabbajackVersion; - protected string VFSCacheName => Path.Combine(Consts.LocalAppDataPath, $"vfs_compile_cache_{ModListName?.StringSHA256Hex() ?? "_Unknown_"}.bin"); + public abstract string VFSCacheName { get; } + //protected string VFSCacheName => Path.Combine(Consts.LocalAppDataPath, $"vfs_compile_cache.bin"); /// /// A stream of tuples of ("Update Title", 0.25) which represent the name of the current task /// and the current progress. diff --git a/Wabbajack.Lib/MO2Compiler.cs b/Wabbajack.Lib/MO2Compiler.cs index 093bdfef..b3144a07 100644 --- a/Wabbajack.Lib/MO2Compiler.cs +++ b/Wabbajack.Lib/MO2Compiler.cs @@ -43,6 +43,10 @@ namespace Wabbajack.Lib public override string ModListOutputFile { get; } + public override string VFSCacheName => Path.Combine( + Consts.LocalAppDataPath, + $"vfs_compile_cache-{Path.Combine(MO2Folder ?? "Unknown", "ModOrganizer.exe").StringSHA256Hex()}.bin"); + public MO2Compiler(string mo2Folder, string mo2Profile, string outputFile) { MO2Folder = mo2Folder; diff --git a/Wabbajack.Lib/VortexCompiler.cs b/Wabbajack.Lib/VortexCompiler.cs index 7bfb3ce1..d625e938 100644 --- a/Wabbajack.Lib/VortexCompiler.cs +++ b/Wabbajack.Lib/VortexCompiler.cs @@ -47,6 +47,10 @@ namespace Wabbajack.Lib private SteamGame _steamGame; private bool _hasSteamWorkshopItems; + public override string VFSCacheName => Path.Combine( + Consts.LocalAppDataPath, + $"vfs_compile_cache-{StagingFolder?.StringSHA256Hex() ?? "Unknown"}.bin"); + public VortexCompiler(Game game, string gamePath, string vortexFolder, string downloadsFolder, string stagingFolder, string outputFile) { Game = game;