From 628302c348a6af753de8ebe889f3c3b3cbf196c5 Mon Sep 17 00:00:00 2001 From: Jean-Francois Dockes Date: Wed, 21 Jan 2015 16:21:33 +0100 Subject: [PATCH] Change things so that the first chunk of a multi-chunk (multi-mb) text files gets an ipath so that it does not stand for the whole file, but is treated like other chunks --- src/internfile/mh_text.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/internfile/mh_text.cpp b/src/internfile/mh_text.cpp index 88853c8d..7947ee3d 100644 --- a/src/internfile/mh_text.cpp +++ b/src/internfile/mh_text.cpp @@ -152,6 +152,12 @@ bool MimeHandlerText::next_document() if (m_offs - srclen != 0) m_metaData[cstr_dj_keyipath] = buf; readnext(); + // This ensures that the first chunk (offs==srclen) of a + // multi-chunk file does have an ipath. Else it stands for the + // whole file, which used to be the case but does not seem + // right + if (m_havedoc) + m_metaData[cstr_dj_keyipath] = buf; return true; } }