mirror of
https://github.com/4sval/FModel.git
synced 2026-09-19 15:04:28 -05:00
oodle init fix
This commit is contained in:
Submodule CUE4Parse updated: d35be31eaa...c55583b929
@@ -236,12 +236,18 @@ public class ApplicationViewModel : ViewModel
|
||||
|
||||
public static async ValueTask InitOodle()
|
||||
{
|
||||
var oodlePath = Path.Combine(UserSettings.Default.OutputDirectory, ".data", OodleHelper.OODLE_DLL_NAME);
|
||||
if (File.Exists(OodleHelper.OODLE_DLL_NAME))
|
||||
if (File.Exists(OodleHelper.OODLE_DLL_NAME_OLD))
|
||||
{
|
||||
File.Move(OodleHelper.OODLE_DLL_NAME, oodlePath, true);
|
||||
try
|
||||
{
|
||||
File.Delete(OodleHelper.OODLE_DLL_NAME_OLD);
|
||||
}
|
||||
catch { /* ignored */}
|
||||
}
|
||||
else if (!File.Exists(oodlePath))
|
||||
|
||||
var oodlePath = Path.Combine(UserSettings.Default.OutputDirectory, ".data", OodleHelper.OODLE_DLL_NAME);
|
||||
|
||||
if (!File.Exists(oodlePath))
|
||||
{
|
||||
await OodleHelper.DownloadOodleDllAsync(oodlePath);
|
||||
}
|
||||
@@ -252,7 +258,9 @@ public class ApplicationViewModel : ViewModel
|
||||
public static async ValueTask InitZlib()
|
||||
{
|
||||
var zlibPath = Path.Combine(UserSettings.Default.OutputDirectory, ".data", ZlibHelper.DLL_NAME);
|
||||
if (!File.Exists(zlibPath))
|
||||
var zlibFileInfo = new FileInfo(zlibPath);
|
||||
|
||||
if (!zlibFileInfo.Exists || zlibFileInfo.LastWriteTimeUtc < DateTime.UtcNow.AddMonths(-4))
|
||||
{
|
||||
await ZlibHelper.DownloadDllAsync(zlibPath);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user