Switch to unified view

a/src/internfile/internfile.cpp b/src/internfile/internfile.cpp
...
...
211
211
212
    string l_mime;
212
    string l_mime;
213
    bool usfci = false;
213
    bool usfci = false;
214
    cnf->getConfParam("usesystemfilecommand", &usfci);
214
    cnf->getConfParam("usesystemfilecommand", &usfci);
215
215
216
    // In general, even when the input mime type is set (when
217
    // previewing), we can't use it: it's the type for the actual
218
    // document, but this can be part of a compound document, and
219
    // we're dealing with the top level file here.
216
    if (flags & FIF_doUseInputMimetype) {
220
    if (flags & FIF_doUseInputMimetype) {
217
        if (!imime) {
221
        if (!imime) {
218
            LOGERR(("FileInterner:: told to use null imime\n"));
222
            LOGERR(("FileInterner:: told to use null imime\n"));
219
            return;
223
            return;
220
        }
224
        }
...
...
248
            return;
252
            return;
249
        }
253
        }
250
        LOGDEB1(("FileInterner:: after ucomp: m_tdir %s, tfile %s\n", 
254
        LOGDEB1(("FileInterner:: after ucomp: m_tdir %s, tfile %s\n", 
251
             m_tdir.dirname(), m_tfile.c_str()));
255
             m_tdir.dirname(), m_tfile.c_str()));
252
        m_fn = m_tfile;
256
        m_fn = m_tfile;
253
257
      // Note: still using the original file's stat. right ?
254
      // Now identify the decompressed file. 
258
      l_mime = mimetype(m_fn, stp, m_cfg, usfci);
255
      if ((flags & FIF_forPreview) && imime) {
259
      if (l_mime.empty() && imime)
256
          // In preview mode, trust the input parameter. The
257
          // file type may depend on the location, ie, for
258
          // .1->text/man, and we just moved the file, so
259
          // we'd be wrong to use mimetype().
260
            l_mime = *imime;
260
            l_mime = *imime;
261
      } else {
262
          // Note: still using the original file's stat. right ?
263
          l_mime = mimetype(m_fn, stp, m_cfg, usfci);
264
          if (l_mime.empty() && imime)
265
          l_mime = *imime;
266
      }
267
        } else {
261
        } else {
268
        LOGINFO(("FileInterner:: %s over size limit %d kbs\n",
262
        LOGINFO(("FileInterner:: %s over size limit %d kbs\n",
269
             m_fn.c_str(), maxkbs));
263
             m_fn.c_str(), maxkbs));
270
        }
264
        }
271
    }
265
    }