mirror of
				https://github.com/kimmknight/remoteapptool.git
				synced 2025-11-04 06:21:55 +00:00 
			
		
		
		
	Merge pull request #30 from kimmknight/issue28
Addressed issue 28 by handling cases where OpenSubKey returns nothing
This commit is contained in:
		@@ -102,15 +102,15 @@ Module LocalFtaModule
 | 
			
		||||
    Public Function DoesFTAExist(fileExtension As String) As Boolean
 | 
			
		||||
        fileExtension = fileExtension.TrimStart(".")
 | 
			
		||||
        Dim FTAexists As Boolean = False
 | 
			
		||||
        Dim HKCRext As String = ""
 | 
			
		||||
        Try
 | 
			
		||||
            HKCRext = My.Computer.Registry.ClassesRoot().OpenSubKey("." & fileExtension).ToString
 | 
			
		||||
 | 
			
		||||
        If Not (My.Computer.Registry.ClassesRoot().OpenSubKey("." & fileExtension) Is Nothing) Then
 | 
			
		||||
            FTAexists = True
 | 
			
		||||
        Catch ex As Exception
 | 
			
		||||
        End Try
 | 
			
		||||
        End If
 | 
			
		||||
 | 
			
		||||
        Return FTAexists
 | 
			
		||||
    End Function
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    Public Function IsFTAMine(fileExtension As String) As Boolean
 | 
			
		||||
        fileExtension = fileExtension.TrimStart(".")
 | 
			
		||||
        IsFTAMine = False
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user