Take attachment display name if filename null
authorAndre Heinecke <aheinecke@gnupg.org>
Mon, 25 Mar 2019 08:05:34 +0000 (09:05 +0100)
committerAndre Heinecke <aheinecke@gnupg.org>
Mon, 25 Mar 2019 08:05:34 +0000 (09:05 +0100)
* src/mapihelp.cpp (get_attach_filename): Check DISPLAY_NAME
as a fallback.

src/mapihelp.cpp

index 3b48a72..e0032ac 100644 (file)
@@ -2279,6 +2279,8 @@ get_attach_filename (LPATTACH obj)
   if (FAILED(hr)) 
     hr = HrGetOneProp ((LPMAPIPROP)obj, PR_ATTACH_FILENAME, &propval);
   if (FAILED(hr))
+    hr = HrGetOneProp ((LPMAPIPROP)obj, PR_DISPLAY_NAME_W, &propval);
+  if (FAILED(hr))
     {
       log_debug ("%s:%s: no filename property found", SRCNAME, __func__);
       TRETURN NULL;