summaryrefslogtreecommitdiff
path: root/pith/osdep
diff options
context:
space:
mode:
authorEduardo Chappa <chappa@washington.edu>2015-10-24 10:47:33 -0600
committerEduardo Chappa <chappa@washington.edu>2015-10-24 10:47:33 -0600
commit62d72d909ffab6da3c13c7a879cf97513dd559d6 (patch)
treef0e3aa0e7d25b64fbff255413ea5274228cc3a91 /pith/osdep
parent940b52d33995e0af13edf48d5ee6647b7e8b4a17 (diff)
downloadalpine-62d72d909ffab6da3c13c7a879cf97513dd559d6.tar.xz
* Crash when opening an attachment in Mac OS X 10.11.1. Reported by
Peter Koellner.
Diffstat (limited to 'pith/osdep')
-rw-r--r--pith/osdep/mimedisp.c16
1 files changed, 1 insertions, 15 deletions
diff --git a/pith/osdep/mimedisp.c b/pith/osdep/mimedisp.c
index 7917a716..94db1328 100644
--- a/pith/osdep/mimedisp.c
+++ b/pith/osdep/mimedisp.c
@@ -28,7 +28,7 @@ static char rcsid[] = "$Id: mimedisp.c 942 2008-03-04 18:21:33Z hubert@u.washing
#include "mimedisp.h"
#include "../charconv/utf8.h"
#ifdef OSX_TARGET
-#include "../../pith/osdep/collate.h" /* for strucmp */
+#include "../../pith/osdep/collate.h" /* for strucmp */
#include <Security/AuthSession.h>
#endif
@@ -412,21 +412,12 @@ osx_build_mime_type_cmd(mime_type, cmd, cmdlen, sp_hndlp)
CFStringRef str_ref = NULL, ret_str_ref = NULL;
CFURLRef url_ref = NULL;
-#ifdef AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER
- if(&LSCopyDefaultApplicationURLForContentType == NULL)
- return 0;
-#else
if(&LSCopyApplicationForMIMEType == NULL)
return 0;
-#endif
if((str_ref = CFStringCreateWithCString(NULL, mime_type,
kCFStringEncodingASCII)) == NULL)
return 0;
-#ifdef AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER
- if(LSCopyDefaultApplicationURLForContentType(str_ref, kLSRolesAll, &url_ref)
-#else
if(LSCopyApplicationForMIMEType(str_ref, kLSRolesAll, &url_ref)
-#endif
!= kLSApplicationNotFoundErr){
if((ret_str_ref = CFURLGetString(url_ref)) == NULL)
return 0;
@@ -463,13 +454,8 @@ osx_build_mime_ext_cmd(mime_ext, cmd, cmdlen, sp_hndlp)
? mime_ext+1 : mime_ext,
kCFStringEncodingASCII)) == NULL)
return 0;
-#ifdef AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER
- if(LSCopyDefaultApplicationURLForContentType(str_ref,
- kLSRolesAll, &url_ref)
-#else
if(LSGetApplicationForInfo(kLSUnknownType, kLSUnknownCreator,
str_ref, kLSRolesAll, NULL, &url_ref)
-#endif
!= kLSApplicationNotFoundErr){
if((ret_str_ref = CFURLGetString(url_ref)) == NULL)
return 0;