Addressed issue 28 by handling cases where OpenSubKey returns nothing (key does not exist)
This commit is contained in:
parent
121c436640
commit
894a30f526
|
@ -102,15 +102,15 @@ Module LocalFtaModule
|
||||||
Public Function DoesFTAExist(fileExtension As String) As Boolean
|
Public Function DoesFTAExist(fileExtension As String) As Boolean
|
||||||
fileExtension = fileExtension.TrimStart(".")
|
fileExtension = fileExtension.TrimStart(".")
|
||||||
Dim FTAexists As Boolean = False
|
Dim FTAexists As Boolean = False
|
||||||
Dim HKCRext As String = ""
|
|
||||||
Try
|
If Not (My.Computer.Registry.ClassesRoot().OpenSubKey("." & fileExtension) Is Nothing) Then
|
||||||
HKCRext = My.Computer.Registry.ClassesRoot().OpenSubKey("." & fileExtension).ToString
|
|
||||||
FTAexists = True
|
FTAexists = True
|
||||||
Catch ex As Exception
|
End If
|
||||||
End Try
|
|
||||||
Return FTAexists
|
Return FTAexists
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
|
||||||
Public Function IsFTAMine(fileExtension As String) As Boolean
|
Public Function IsFTAMine(fileExtension As String) As Boolean
|
||||||
fileExtension = fileExtension.TrimStart(".")
|
fileExtension = fileExtension.TrimStart(".")
|
||||||
IsFTAMine = False
|
IsFTAMine = False
|
||||||
|
|
Loading…
Reference in New Issue