From: Vadim Zeitlin Date: Fri, 31 Jan 2003 23:09:35 +0000 (+0000) Subject: silently ignore any X-fields in mime.types X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/70687b638d5860a91a53aecec2a43d838d925372 silently ignore any X-fields in mime.types git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19043 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/unix/mimetype.cpp b/src/unix/mimetype.cpp index 36789f0add..4b6378e1d6 100644 --- a/src/unix/mimetype.cpp +++ b/src/unix/mimetype.cpp @@ -2185,15 +2185,19 @@ bool wxMimeTypesManagerImpl::ReadMimeTypes(const wxString& strFileName) else if ( strLHS == wxT("exts") ) { strExtensions = strRHS; } - else { + else if ( strLHS != _T("icon") ) + { // this one is simply ignored: it usually refers to Netscape // built in icons which are useless for us anyhow - if ( strLHS != _T("icon") ) - { - // This crashes for some reason in wcslen() in libc. RR. - // wxLogWarning(_("Unknown field in file %s, line %d: '%s'."), - // strFileName.c_str(), nLine + 1, strLHS.c_str()); - } + } + else if ( !strLHS.StartsWith(_T("x-")) ) + { + // we suppose that all fields starting with "X-" are + // unregistered extensions according to the standard practice, + // but it may be worth telling the user about other junk in + // his mime.types file + wxLogWarning(_("Unknown field in file %s, line %d: '%s'."), + strFileName.c_str(), nLine + 1, strLHS.c_str()); } if ( !entryEnded ) {