Skip to content

Commit

Permalink
Fix an issue with first run, and an abandoned mutex
Browse files Browse the repository at this point in the history
  • Loading branch information
dmssargent committed Aug 4, 2016
1 parent fed7914 commit 85d5ea3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 4 additions & 1 deletion APKInstaller/src/AppUpdateManager.vb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ Imports System.IO
Imports System.Threading
Imports APKInstaller.My.Resources
Imports MaterialSkin.Controls
Imports Microsoft.VisualBasic.Logging
Imports Microsoft.Win32
Imports Squirrel

Expand Down Expand Up @@ -218,4 +217,8 @@ Public Class AppUpdateManager
UpdateManager.RestartApp()
End If
End Sub

Sub CleanUp()
_updateManager.Dispose()
End Sub
End Class
3 changes: 2 additions & 1 deletion APKInstaller/src/Main.vb
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Public Class Main
Dim enableFileArg = True
For Each arg As String In My.Application.CommandLineArgs
If arg.StartsWith("--", StringComparison.Ordinal) Or arg.StartsWith("-", StringComparison.Ordinal) Then
If arg.Contains("squirrel") Then
If arg.Contains("squirrel") AndAlso Not arg.Contains("firstrun") Then
enableFileArg = False
End If
noPrompt = ParseNonFileArgument(noPrompt, arg)
Expand Down Expand Up @@ -284,6 +284,7 @@ Public Class Main
<Log("App Installer Debug")>
Private Sub Form1_Closed(sender As Object, e As EventArgs) Handles Me.Closed
IoUtilities.Cleanup() ' Cleanup all of the tools we used
_updateMgr.CleanUp()
End Sub

<SuppressMessage("Microsoft.Design", "CA1045:DoNotPassTypesByReference", MessageId:="0#")>
Expand Down

0 comments on commit 85d5ea3

Please sign in to comment.