some fixes

This commit is contained in:
2024-06-22 11:22:02 +02:00
parent 20c1e5dc8e
commit 4b78ce1b6f
3 changed files with 13 additions and 5 deletions

View File

@@ -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();