fix endless update
This commit is contained in:
@@ -83,6 +83,8 @@ public class ModpackInstaller(ModpackConfig updateConfig, ModpackInfo modpackInf
|
|||||||
if (result.Actions.Count == 0)
|
if (result.Actions.Count == 0)
|
||||||
result.HasError = true;
|
result.HasError = true;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
result.IsInstalled = true;
|
||||||
|
|
||||||
// Check update actions
|
// Check update actions
|
||||||
if (!result.HasError && (exists || options.AllowUpdaterAfterInstall))
|
if (!result.HasError && (exists || options.AllowUpdaterAfterInstall))
|
||||||
@@ -107,8 +109,10 @@ public class ModpackInstaller(ModpackConfig updateConfig, ModpackInfo modpackInf
|
|||||||
|
|
||||||
// Check & add
|
// Check & add
|
||||||
if (action.Side.IsSide(options.Side) && (!action.IsExtra || options.IncludeExtras) && !result.Actions.Any(n => n.DestPath == action.DestPath))
|
if (action.Side.IsSide(options.Side) && (!action.IsExtra || options.IncludeExtras) && !result.Actions.Any(n => n.DestPath == action.DestPath))
|
||||||
|
{
|
||||||
actionsToAdd.Add(action);
|
actionsToAdd.Add(action);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
result.Actions.InsertRange(actionsZeroIndex, actionsToAdd);
|
result.Actions.InsertRange(actionsZeroIndex, actionsToAdd);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user