diff --git a/CreamInstaller/CreamInstaller.csproj b/CreamInstaller/CreamInstaller.csproj index b96d52f..a965909 100644 --- a/CreamInstaller/CreamInstaller.csproj +++ b/CreamInstaller/CreamInstaller.csproj @@ -5,7 +5,7 @@ True Resources\ini.ico true - 3.3.0.1 + 3.3.0.2 Resources\ini.ico LICENSE 2021, pointfeev (https://github.com/pointfeev) diff --git a/CreamInstaller/Forms/SelectForm.cs b/CreamInstaller/Forms/SelectForm.cs index 43aafd6..8cacf7d 100644 --- a/CreamInstaller/Forms/SelectForm.cs +++ b/CreamInstaller/Forms/SelectForm.cs @@ -471,8 +471,8 @@ internal partial class SelectForm : CustomForm if (e.Action == TreeViewAction.Unknown) return; TreeNode node = e.Node; if (node is null) return; - CheckNode(node); - SyncNodeParents(node); + SyncNode(node); + SyncNodeAncestors(node); SyncNodeDescendants(node); allCheckBox.CheckedChanged -= OnAllCheckBoxChanged; allCheckBox.Checked = TreeNodes.TrueForAll(treeNode => treeNode.Checked); @@ -481,13 +481,13 @@ internal partial class SelectForm : CustomForm uninstallButton.Enabled = installButton.Enabled; } - private static void SyncNodeParents(TreeNode node) + private static void SyncNodeAncestors(TreeNode node) { TreeNode parentNode = node.Parent; if (parentNode is not null) { - parentNode.Checked = parentNode.Nodes.Cast().ToList().Any(childNode => childNode.Checked); - SyncNodeParents(parentNode); + parentNode.Checked = parentNode.Nodes.Cast().Any(childNode => childNode.Checked); + SyncNodeAncestors(parentNode); } } @@ -495,11 +495,11 @@ internal partial class SelectForm : CustomForm node.Nodes.Cast().ToList().ForEach(childNode => { childNode.Checked = node.Checked; - CheckNode(childNode); + SyncNode(childNode); SyncNodeDescendants(childNode); }); - private static void CheckNode(TreeNode node) + private static void SyncNode(TreeNode node) { (string gameId, (DlcType type, string name, string icon) app)? dlc = ProgramSelection.GetDlcFromId(node.Name); if (dlc.HasValue) @@ -591,6 +591,7 @@ internal partial class SelectForm : CustomForm contextMenuStrip.Items.Add(header ?? new ContextMenuItem(node.Text)); string appInfoVDF = $@"{SteamCMD.AppInfoPath}\{id}.vdf"; string appInfoJSON = $@"{SteamCMD.AppInfoPath}\{id}.json"; + string cooldown = $@"{ProgramData.CooldownPath}\{id}.txt"; if (Directory.Exists(Directory.GetDirectoryRoot(appInfoVDF)) && (File.Exists(appInfoVDF) || File.Exists(appInfoJSON))) { List queries = new(); @@ -618,6 +619,11 @@ internal partial class SelectForm : CustomForm File.Delete(appInfoJSON); } catch { } + try + { + File.Delete(cooldown); + } + catch { } OnLoad(); }))); }