From d742ce88764a5354f44a975ea4fb00358fd5585a Mon Sep 17 00:00:00 2001 From: Jonathan Jenne Date: Mon, 28 Feb 2022 14:10:53 +0100 Subject: [PATCH] Windows: fix outlook attachments not being recognized --- Windows/FileDrop.vb | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/Windows/FileDrop.vb b/Windows/FileDrop.vb index 42b7bfbb..51fce442 100644 --- a/Windows/FileDrop.vb +++ b/Windows/FileDrop.vb @@ -280,10 +280,7 @@ Partial Public Class FileDrop Dim oFormats = pEvent.Data.GetFormats(pAutoConvert).ToList() Dim oFormatExists = oFormats.Any(Function(format) format = pFormat) - ' This does not work with locally created outlook mails - 'Dim oFormatExists = pEvent.Data.GetDataPresent(pFormat) - - Logger.Debug("Format exists: [{0}]/[{1}]", pFormat, oFormatExists) + Logger.Debug("Format [{0}] exists: [{1}]", pFormat, oFormatExists) Return oFormatExists End Function @@ -296,9 +293,11 @@ Partial Public Class FileDrop End Function Public Function IsOutlook(e As DragEventArgs) As Boolean + Logger.Debug("Checking for Outlook") Return CheckFor(e, "FileGroupDescriptor") AndAlso CheckFor(e, "FileContents") End Function Public Function IsThunderbird(e As DragEventArgs) As Boolean + Logger.Debug("Checking for Thunderbird") Return CheckFor(e, "text/x-moz-url") AndAlso CheckFor(e, "FileDrop") End Function @@ -334,22 +333,24 @@ Partial Public Class FileDrop #Region "Thunderbird" Private Function IsOutlookMail(e As DragEventArgs) As Boolean + Logger.Debug("Checking for Outlook Mail") Return Not IsOutlookAttachment(e) AndAlso CheckFor(e, "RenPrivateSourceFolder") End Function Private Function IsOutlookAttachment(e As DragEventArgs) As Boolean - Return IsOutlook(e) AndAlso - CheckFor(e, "RenPrivateItem") AndAlso - CheckFor(e, "ZoneIdentifier") + Logger.Debug("Checking for Outlook Attachment") + Return IsOutlook(e) AndAlso CheckFor(e, "RenPrivateItem") End Function #End Region #Region "Outlook" Private Function IsThunderbirdMail(e As DragEventArgs) As Boolean + Logger.Debug("Checking for Thunderbird Mail") Return Not IsThunderbirdAttachment(e) End Function Private Function IsThunderbirdAttachment(e As DragEventArgs) As Boolean + Logger.Debug("Checking for Thunderbird Attachment") Return IsThunderbird(e) AndAlso CheckFor(e, "text/x-moz-url-data") AndAlso CheckFor(e, "text/x-moz-url-desc")