some fixes
This commit is contained in:
@@ -41,7 +41,6 @@ public class ModpackInstaller(ModpackConfig updateConfig, ModpackInfo modpackInf
|
|||||||
{
|
{
|
||||||
InstallInfos installInfos = null;
|
InstallInfos installInfos = null;
|
||||||
UpdateInfos updateInfos = null;
|
UpdateInfos updateInfos = null;
|
||||||
var hasConfig = modpackInfo.Exists;
|
|
||||||
var result = new UpdateCheckResult();
|
var result = new UpdateCheckResult();
|
||||||
|
|
||||||
if (updateConfig.Maintenance && !options.IgnoreMaintenance)
|
if (updateConfig.Maintenance && !options.IgnoreMaintenance)
|
||||||
@@ -50,7 +49,13 @@ public class ModpackInstaller(ModpackConfig updateConfig, ModpackInfo modpackInf
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!hasConfig)
|
if (modpackInfo == null || !Directory.Exists(modpackInfo.LocaLPath))
|
||||||
|
{
|
||||||
|
result.HasError = true;
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!modpackInfo.Exists)
|
||||||
{
|
{
|
||||||
installInfos = await DownloadInstallInfos();
|
installInfos = await DownloadInstallInfos();
|
||||||
|
|
||||||
|
|||||||
@@ -33,7 +33,10 @@ public class ModpackInfo
|
|||||||
{
|
{
|
||||||
if (HasModpackInfo(mcRoot))
|
if (HasModpackInfo(mcRoot))
|
||||||
return Load(mcRoot);
|
return Load(mcRoot);
|
||||||
return new();
|
return new()
|
||||||
|
{
|
||||||
|
LocaLPath = mcRoot
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ModpackInfo Load(string mcRoot)
|
public static ModpackInfo Load(string mcRoot)
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ namespace ModpackUpdater;
|
|||||||
|
|
||||||
public partial class Form1
|
public partial class Form1
|
||||||
{
|
{
|
||||||
private ModpackInfo modpackInfo = null;
|
private ModpackInfo modpackInfo = new();
|
||||||
private ModpackConfig updateConfig = new();
|
private ModpackConfig updateConfig = new();
|
||||||
private bool currentUpdating = false;
|
private bool currentUpdating = false;
|
||||||
private UpdateCheckResult lastUpdateCheckResult = null;
|
private UpdateCheckResult lastUpdateCheckResult = null;
|
||||||
@@ -94,7 +94,7 @@ public partial class Form1
|
|||||||
{
|
{
|
||||||
RadTextBoxControl_MinecraftProfileFolder.Text = folderPath;
|
RadTextBoxControl_MinecraftProfileFolder.Text = folderPath;
|
||||||
|
|
||||||
if (IsUpdateConfigLoaded())
|
if (IsMinecaftProfileLoaded())
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user