mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Move settings and other cache data to the local user folder.
This commit is contained in:
parent
348abab902
commit
e4d4a890f1
@ -100,5 +100,7 @@ namespace Wabbajack.Common
|
||||
public static int WabbajackCachePort = 80;
|
||||
public static int MaxHTTPRetries = 4;
|
||||
public const string MO2ModFolderName = "mods";
|
||||
|
||||
public static string PatchCacheFolder => Path.Combine(LocalAppDataPath, "patch_cache");
|
||||
}
|
||||
}
|
||||
|
@ -824,9 +824,9 @@ namespace Wabbajack.Common
|
||||
{
|
||||
var dataA = a.xxHash().FromBase64().ToHex();
|
||||
var dataB = b.xxHash().FromBase64().ToHex();
|
||||
var cacheFile = Path.Combine("patch_cache", $"{dataA}_{dataB}.patch");
|
||||
if (!Directory.Exists("patch_cache"))
|
||||
Directory.CreateDirectory("patch_cache");
|
||||
var cacheFile = Path.Combine(Consts.PatchCacheFolder, $"{dataA}_{dataB}.patch");
|
||||
if (!Directory.Exists(Consts.PatchCacheFolder))
|
||||
Directory.CreateDirectory(Consts.PatchCacheFolder);
|
||||
|
||||
while (true)
|
||||
{
|
||||
@ -837,7 +837,7 @@ namespace Wabbajack.Common
|
||||
}
|
||||
else
|
||||
{
|
||||
var tmpName = Path.Combine("patch_cache", Guid.NewGuid() + ".tmp");
|
||||
var tmpName = Path.Combine(Consts.PatchCacheFolder, Guid.NewGuid() + ".tmp");
|
||||
|
||||
await using (var f = File.Open(tmpName, System.IO.FileMode.Create))
|
||||
{
|
||||
@ -867,7 +867,7 @@ namespace Wabbajack.Common
|
||||
|
||||
public static bool TryGetPatch(string foundHash, string fileHash, out byte[] ePatch)
|
||||
{
|
||||
var patchName = Path.Combine("patch_cache",
|
||||
var patchName = Path.Combine(Consts.PatchCacheFolder,
|
||||
$"{foundHash.FromBase64().ToHex()}_{fileHash.FromBase64().ToHex()}.patch");
|
||||
if (File.Exists(patchName))
|
||||
{
|
||||
|
@ -22,7 +22,7 @@ namespace Wabbajack.Lib
|
||||
public bool ReadmeIsWebsite;
|
||||
public string WabbajackVersion;
|
||||
|
||||
protected static string _vfsCacheName = "vfs_compile_cache.bin";
|
||||
protected static string _vfsCacheName => Path.Combine(Consts.LocalAppDataPath, "vfs_compile_cache.bin");
|
||||
/// <summary>
|
||||
/// A stream of tuples of ("Update Title", 0.25) which represent the name of the current task
|
||||
/// and the current progress.
|
||||
|
@ -88,7 +88,7 @@ namespace Wabbajack.Lib.LibCefHelpers
|
||||
if (Inited) return;
|
||||
Inited = true;
|
||||
CefSettings settings = new CefSettings();
|
||||
settings.CachePath = Path.Combine(Directory.GetCurrentDirectory() + @"\CEF");
|
||||
settings.CachePath = Path.Combine(Consts.LocalAppDataPath + @"\CEF");
|
||||
Cef.Initialize(settings);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user