2 Commits

Author SHA1 Message Date
Jonathan Jenne
39b0f2d582 Windows: Version 1.4.4 2022-02-28 14:11:15 +01:00
Jonathan Jenne
d742ce8876 Windows: fix outlook attachments not being recognized 2022-02-28 14:10:53 +01:00
2 changed files with 10 additions and 9 deletions

View File

@@ -280,10 +280,7 @@ Partial Public Class FileDrop
Dim oFormats = pEvent.Data.GetFormats(pAutoConvert).ToList() Dim oFormats = pEvent.Data.GetFormats(pAutoConvert).ToList()
Dim oFormatExists = oFormats.Any(Function(format) format = pFormat) Dim oFormatExists = oFormats.Any(Function(format) format = pFormat)
' This does not work with locally created outlook mails Logger.Debug("Format [{0}] exists: [{1}]", pFormat, oFormatExists)
'Dim oFormatExists = pEvent.Data.GetDataPresent(pFormat)
Logger.Debug("Format exists: [{0}]/[{1}]", pFormat, oFormatExists)
Return oFormatExists Return oFormatExists
End Function End Function
@@ -296,9 +293,11 @@ Partial Public Class FileDrop
End Function End Function
Public Function IsOutlook(e As DragEventArgs) As Boolean Public Function IsOutlook(e As DragEventArgs) As Boolean
Logger.Debug("Checking for Outlook")
Return CheckFor(e, "FileGroupDescriptor") AndAlso CheckFor(e, "FileContents") Return CheckFor(e, "FileGroupDescriptor") AndAlso CheckFor(e, "FileContents")
End Function End Function
Public Function IsThunderbird(e As DragEventArgs) As Boolean Public Function IsThunderbird(e As DragEventArgs) As Boolean
Logger.Debug("Checking for Thunderbird")
Return CheckFor(e, "text/x-moz-url") AndAlso CheckFor(e, "FileDrop") Return CheckFor(e, "text/x-moz-url") AndAlso CheckFor(e, "FileDrop")
End Function End Function
@@ -334,22 +333,24 @@ Partial Public Class FileDrop
#Region "Thunderbird" #Region "Thunderbird"
Private Function IsOutlookMail(e As DragEventArgs) As Boolean Private Function IsOutlookMail(e As DragEventArgs) As Boolean
Logger.Debug("Checking for Outlook Mail")
Return Not IsOutlookAttachment(e) AndAlso CheckFor(e, "RenPrivateSourceFolder") Return Not IsOutlookAttachment(e) AndAlso CheckFor(e, "RenPrivateSourceFolder")
End Function End Function
Private Function IsOutlookAttachment(e As DragEventArgs) As Boolean Private Function IsOutlookAttachment(e As DragEventArgs) As Boolean
Return IsOutlook(e) AndAlso Logger.Debug("Checking for Outlook Attachment")
CheckFor(e, "RenPrivateItem") AndAlso Return IsOutlook(e) AndAlso CheckFor(e, "RenPrivateItem")
CheckFor(e, "ZoneIdentifier")
End Function End Function
#End Region #End Region
#Region "Outlook" #Region "Outlook"
Private Function IsThunderbirdMail(e As DragEventArgs) As Boolean Private Function IsThunderbirdMail(e As DragEventArgs) As Boolean
Logger.Debug("Checking for Thunderbird Mail")
Return Not IsThunderbirdAttachment(e) Return Not IsThunderbirdAttachment(e)
End Function End Function
Private Function IsThunderbirdAttachment(e As DragEventArgs) As Boolean Private Function IsThunderbirdAttachment(e As DragEventArgs) As Boolean
Logger.Debug("Checking for Thunderbird Attachment")
Return IsThunderbird(e) AndAlso Return IsThunderbird(e) AndAlso
CheckFor(e, "text/x-moz-url-data") AndAlso CheckFor(e, "text/x-moz-url-data") AndAlso
CheckFor(e, "text/x-moz-url-desc") CheckFor(e, "text/x-moz-url-desc")

View File

@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
' übernehmen, indem Sie "*" eingeben: ' übernehmen, indem Sie "*" eingeben:
' <Assembly: AssemblyVersion("1.0.*")> ' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("1.4.3.0")> <Assembly: AssemblyVersion("1.4.4.0")>
<Assembly: AssemblyFileVersion("1.4.3.0")> <Assembly: AssemblyFileVersion("1.4.4.0")>