Switch to unified view

a/src/internfile/internfile.cpp b/src/internfile/internfile.cpp
...
...
677
        }
677
        }
678
    } else if (it->first == cstr_dj_keymd) {
678
    } else if (it->first == cstr_dj_keymd) {
679
        doc.dmtime = it->second;
679
        doc.dmtime = it->second;
680
    } else if (it->first == cstr_dj_keyorigcharset) {
680
    } else if (it->first == cstr_dj_keyorigcharset) {
681
        doc.origcharset = it->second;
681
        doc.origcharset = it->second;
682
  } else if (it->first == cstr_dj_keyfn) {
683
      // Only if not set during the stack walk
684
      const string *fnp = 0;
685
      if (!doc.peekmeta(Rcl::Doc::keyfn, &fnp) || fnp->empty())
686
      doc.meta[Rcl::Doc::keyfn] = it->second;
682
    } else if (it->first == cstr_dj_keymt || 
687
    } else if (it->first == cstr_dj_keymt || 
683
           it->first == cstr_dj_keycharset) {
688
           it->first == cstr_dj_keycharset) {
684
        // don't need/want these.
689
        // don't need/want these.
685
    } else {
690
    } else {
686
        doc.meta[it->first] = it->second;
691
        doc.meta[it->first] = it->second;
...
...
733
    if (getKeyValue(docdata, cstr_dj_keyipath, ipathel)) {
738
    if (getKeyValue(docdata, cstr_dj_keyipath, ipathel)) {
734
        if (!ipathel.empty()) {
739
        if (!ipathel.empty()) {
735
        // We have a non-empty ipath
740
        // We have a non-empty ipath
736
        hasipath = true;
741
        hasipath = true;
737
        getKeyValue(docdata, cstr_dj_keymt, doc.mimetype);
742
        getKeyValue(docdata, cstr_dj_keymt, doc.mimetype);
738
        getKeyValue(docdata, cstr_dj_keyfn, doc.utf8fn);
743
        getKeyValue(docdata, cstr_dj_keyfn, doc.meta[Rcl::Doc::keyfn]);
739
        } else {
744
        } else {
740
        if (doc.fbytes.empty())
745
        if (doc.fbytes.empty())
741
            getKeyValue(docdata, cstr_dj_keydocsize, doc.fbytes);
746
            getKeyValue(docdata, cstr_dj_keydocsize, doc.fbytes);
742
        }
747
        }
743
        doc.ipath += colon_hide(ipathel) + cstr_isep;
748
        doc.ipath += colon_hide(ipathel) + cstr_isep;
...
...
997
    if (m_handlers.empty()) {
1002
    if (m_handlers.empty()) {
998
    LOGDEB(("FileInterner::internfile: conversion ended with no doc\n"));
1003
    LOGDEB(("FileInterner::internfile: conversion ended with no doc\n"));
999
    return FIError;
1004
    return FIError;
1000
    }
1005
    }
1001
1006
1002
    // If indexing compute ipath and significant mimetype.  ipath is
1007
    // Compute ipath and significant mimetype.  ipath is returned
1003
    // returned through doc.ipath. We also retrieve some metadata
1008
    // through doc.ipath. We also retrieve some metadata fields from
1004
    // fields from the ancesters (like date or author). This is useful
1009
    // the ancesters (like date or author). This is useful for email
1005
    // for email attachments. The values will be replaced by those
1010
    // attachments. The values will be replaced by those internal to
1006
    // internal to the document (by dijontorcl()) if any, so the order
1011
    // the document (by dijontorcl()) if any, so the order of calls is
1007
    // of calls is important.
1012
    // important. We used to only do this when indexing, but the aux
1013
    // fields like filename and author may be interesting when
1014
    // previewing too
1015
    collectIpathAndMT(doc);
1008
    if (!m_forPreview) {
1016
    if (m_forPreview) {
1009
  collectIpathAndMT(doc);
1010
    } else {
1011
    doc.mimetype = m_reachedMType;
1017
    doc.mimetype = m_reachedMType;
1012
    }
1018
    }
1013
    // Keep this AFTER collectIpathAndMT
1019
    // Keep this AFTER collectIpathAndMT
1014
    dijontorcl(doc);
1020
    dijontorcl(doc);
1015
1021