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