From 74eaa6fdb51cb02694f5347fcc3da61b6667ae5a Mon Sep 17 00:00:00 2001 From: iaom <18504285112@163.com> Date: Tue, 9 Mar 2021 09:56:47 +0800 Subject: [PATCH] [FIX]Some 'doc' type could not be read. --- libsearch/index/file-reader.cpp | 2 +- libsearch/parser/binary-parser.cpp | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/libsearch/index/file-reader.cpp b/libsearch/index/file-reader.cpp index eb0adb3..12326ab 100644 --- a/libsearch/index/file-reader.cpp +++ b/libsearch/index/file-reader.cpp @@ -42,7 +42,7 @@ void FileReader::getTextContent(QString path, QString &textContent) if(strsfx.endsWith( "txt")) FileUtils::getTxtContent(path,textContent); } - else if(type.inherits("application/msword")) + else if(type.inherits("application/msword") || type.name() == "application/x-ole-storage") { if (strsfx.endsWith("doc")) { diff --git a/libsearch/parser/binary-parser.cpp b/libsearch/parser/binary-parser.cpp index 6a2f18c..b16deb4 100644 --- a/libsearch/parser/binary-parser.cpp +++ b/libsearch/parser/binary-parser.cpp @@ -5067,6 +5067,8 @@ bool KBinaryParser::read8DocText(FILE *pFile, const ppsInfoType *pPPS, //need more format document ptaucBytes = (UCHAR*)xfree((void*)ptaucBytes); qWarning()<<"Parser error:"<