a/src/qtgui/preview_w.cpp b/src/qtgui/preview_w.cpp
1
#ifndef lint
1
#ifndef lint
2
static char rcsid[] = "@(#$Id: preview_w.cpp,v 1.10 2006-12-14 13:53:43 dockes Exp $ (C) 2005 J.F.Dockes";
2
static char rcsid[] = "@(#$Id: preview_w.cpp,v 1.11 2006-12-19 08:40:50 dockes Exp $ (C) 2005 J.F.Dockes";
3
#endif
3
#endif
4
/*
4
/*
5
 *   This program is free software; you can redistribute it and/or modify
5
 *   This program is free software; you can redistribute it and/or modify
6
 *   it under the terms of the GNU General Public License as published by
6
 *   it under the terms of the GNU General Public License as published by
7
 *   the Free Software Foundation; either version 2 of the License, or
7
 *   the Free Software Foundation; either version 2 of the License, or
...
...
17
 *   Free Software Foundation, Inc.,
17
 *   Free Software Foundation, Inc.,
18
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
18
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
19
 */
19
 */
20
#include <unistd.h>
20
#include <unistd.h>
21
#include <time.h>
21
#include <time.h>
22
#include <sys/stat.h>
22
23
23
#include <list>
24
#include <list>
24
#include <utility>
25
#include <utility>
25
#ifndef NO_NAMESPACES
26
#ifndef NO_NAMESPACES
26
using std::pair;
27
using std::pair;
...
...
458
                  Preview::tr("Cannot create temporary directory"));
459
                  Preview::tr("Cannot create temporary directory"));
459
        LOGERR(("Preview: %s\n", reason.c_str()));
460
        LOGERR(("Preview: %s\n", reason.c_str()));
460
        *statusp = -1;
461
        *statusp = -1;
461
        return;
462
        return;
462
    }
463
    }
464
  struct stat st;
465
  if (stat(filename.c_str(), &st) < 0) {
466
      LOGERR(("Preview: can't stat [%s]\n", filename.c_str()));
467
      QMessageBox::critical(0, "Recoll",
468
                Preview::tr("File does not exist"));
469
      *statusp = -1;
470
      return;
471
  }
472
      
463
    FileInterner interner(filename, rclconfig, tmpdir, mtype);
473
    FileInterner interner(filename, &st, rclconfig, tmpdir, mtype);
464
    try {
474
    try {
465
        FileInterner::Status ret = interner.internfile(*out, ipath);
475
        FileInterner::Status ret = interner.internfile(*out, ipath);
466
        if (ret == FileInterner::FIDone || ret == FileInterner::FIAgain) {
476
        if (ret == FileInterner::FIDone || ret == FileInterner::FIAgain) {
467
        // FIAgain is actually not nice here. It means that the record
477
        // FIAgain is actually not nice here. It means that the record
468
        // for the *file* of a multidoc was selected. Actually this
478
        // for the *file* of a multidoc was selected. Actually this