fix first install includes ALL updates
This commit is contained in:
@@ -59,7 +59,7 @@ public class ModpackInstaller(ModpackConfig updateConfig, ModpackInfo modpackInf
|
||||
}
|
||||
|
||||
installInfos = await DownloadInstallInfos();
|
||||
result.CurrentVersion = modpackInfo.Version ?? new Version("0.0.0.0");
|
||||
result.CurrentVersion = modpackInfo.Version ?? installInfos.Version;
|
||||
var curVersion = result.CurrentVersion;
|
||||
|
||||
// Check install actions
|
||||
@@ -222,6 +222,8 @@ public class ModpackInstaller(ModpackConfig updateConfig, ModpackInfo modpackInf
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(destFilePath));
|
||||
|
||||
if (!isZip || localZipCache.FirstOrDefault(n => n.DownloadUrl == sourceUrl) is not LocalZipCacheEntry cachedZipInfo)
|
||||
{
|
||||
try
|
||||
{
|
||||
// Download
|
||||
var fsDestinationPath = isZip ? Path.Combine(Path.GetTempPath(), $"mc_update_file_{DateTime.Now.ToBinary()}.zip") : destFilePath;
|
||||
@@ -253,6 +255,11 @@ public class ModpackInstaller(ModpackConfig updateConfig, ModpackInfo modpackInf
|
||||
else
|
||||
cachedZipInfo = null;
|
||||
}
|
||||
catch (HttpRequestException ex)
|
||||
{
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
// Handle zip file content
|
||||
if (cachedZipInfo != null)
|
||||
|
||||
Reference in New Issue
Block a user