fix: 修复除version.json外无文件更新时不保存version

This commit is contained in:
uye
2023-12-07 19:26:39 +08:00
parent 10ed8af466
commit f7555ebff9

View File

@@ -216,15 +216,16 @@ namespace MaaWpfGui.Models
return UpdateResult.Failed;
}
if (ret1 != UpdateResult.Success && ret2 != UpdateResult.Success)
PostProcVersionChecks();
if (ret1 == UpdateResult.Success || ret2 == UpdateResult.Success)
{
OutputDownloadProgress(LocalizationHelper.GetString("GameResourceNotModified"));
return UpdateResult.NotModified;
OutputDownloadProgress(LocalizationHelper.GetString("GameResourceUpdated"));
return UpdateResult.Success;
}
PostProcVersionChecks();
OutputDownloadProgress(LocalizationHelper.GetString("GameResourceUpdated"));
return UpdateResult.Success;
OutputDownloadProgress(LocalizationHelper.GetString("GameResourceNotModified"));
return UpdateResult.NotModified;
}
private static async Task<UpdateResult> UpdateSingleFiles(string baseUrl, int maxRetryTime = 2)