Free, open-source Windows optimization tool for performance, privacy, and simplicity.
C# csharpdebloatdotnetgamingopen-sourceoptimizationoptimizeroptimizerduckperformanceprivacytweakertweakswindowswinui
Fix missing tracking for SystemProtectionHelper
itsfatducka4179eb8f938
diff --git a/optimizerDuck/src/Core/Helpers/SystemHelper.cs b/optimizerDuck/src/Core/Helpers/SystemHelper.csindex 1808ee2..b9aaead 100644--- a/optimizerDuck/src/Core/Helpers/SystemHelper.cs+++ b/optimizerDuck/src/Core/Helpers/SystemHelper.cs@@ -72,8 +72,6 @@ public static class SystemHelperLog.LogWarning("Path not excluded: {RootPath}", Defaults.RootPath);missingPaths.Add(Defaults.RootPath);}-- // return missing pathreturn missingPaths;}diff --git a/optimizerDuck/src/Core/Helpers/SystemProtectionHelper.cs b/optimizerDuck/src/Core/Helpers/SystemProtectionHelper.csindex d396d6b..067e495 100644--- a/optimizerDuck/src/Core/Helpers/SystemProtectionHelper.cs+++ b/optimizerDuck/src/Core/Helpers/SystemProtectionHelper.cs@@ -12,7 +12,9 @@ public static class SystemProtectionHelperpublic static bool Enable(){+ using var tracker = ServiceTracker.Begin();Log.LogInformation("Enabling System Protection...");+var result = ShellService.PowerShell("Enable-ComputerRestore -Drive \"$env:SystemDrive\"");if (result.ExitCode != 0){@@ -33,7 +35,9 @@ public static class SystemProtectionHelperpublic static void Create(){+ using var tracker = ServiceTracker.Begin();Log.LogInformation("Creating a restore point...");+var result =ShellService.PowerShell($"Checkpoint-Computer -Description \"{Defaults.RestorePointName}\" -RestorePointType MODIFY_SETTINGS");@@ -49,9 +53,8 @@ public static class SystemProtectionHelpernew PromptOption("Skip", Theme.Error));}else- {Log.LogInformation($"[{Theme.Success}]A restore point [{Theme.Primary}]{Defaults.RestorePointName}[/] created successfully.[/]");- }+}}\ No newline at end of file