mirror of
https://github.com/4sval/FModel.git
synced 2026-03-21 17:24:26 -05:00
oodle init fix
This commit is contained in:
parent
f082d39bf9
commit
5d34bfaf4e
|
|
@ -1 +1 @@
|
|||
Subproject commit d35be31eaaf7e327dfb43132584624af9c29c13e
|
||||
Subproject commit c55583b9295179c719a58b465d5dd6e493021f0b
|
||||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user