Skip to content

Commit

Permalink
#173 fixed updater bug
Browse files Browse the repository at this point in the history
  • Loading branch information
JAMGALACTIC committed Nov 3, 2023
1 parent 5079d88 commit 3058251
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,9 @@ YTR's main interface is pretty straight forward. Simply enter the URL of any vid

## CHANGELOG <a name="changelog"></a>

### 11/03/2023 v1.0.4.11
- Fixed Bug Where Updater Was Being Deleted

### 11/03/2023 v1.0.4.10
- Added App Dependency Update Consistency Check
- Added Extra Error Information if Updater Cannot Be Found
Expand Down
3 changes: 2 additions & 1 deletion YT-RED Updater/Updater.cs
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ public static async Task<ProcessResult> BackupCurrent(Action<int> reportProgress
return result;
}

public static async Task<ProcessResult> CleanBaseDirectory(Action<int> reportProgress)
public static async Task<ProcessResult> CleanBaseDirectory(Action<int> reportProgress, bool newUpdater = false)
{
ProcessResult result = new ProcessResult();
try
Expand All @@ -185,6 +185,7 @@ public static async Task<ProcessResult> CleanBaseDirectory(Action<int> reportPro
&& !f.FullName.Contains(@"\Updates\")
&& f.Directory.Name != "Backup"
&& !f.FullName.Contains(@"\Backup\")
&& (newUpdater || (!newUpdater && f.Name != "YTR_Updater.exe"))
)
.ToList();
Expand Down
2 changes: 1 addition & 1 deletion YT-RED Updater/UpdaterForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public async void RunUpdater(bool updateUpdater)
marquee.Text = "Cleaning Up Files";
marquee.Properties.Stopped = false;
progress.Position = 0;
ProcessResult clean = await Updater.CleanBaseDirectory(reportProgress);
ProcessResult clean = await Updater.CleanBaseDirectory(reportProgress, updateUpdater);
progress.Position = 0;
marquee.Text = "";
marquee.Properties.Stopped = true;
Expand Down
2 changes: 1 addition & 1 deletion YT-RED/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.4.10")]
[assembly: AssemblyVersion("1.0.4.11")]
[assembly: AssemblyBuild("Alpha") ]
[assembly: AssemblyFileVersion("1.0.0.0")]

0 comments on commit 3058251

Please sign in to comment.