Switch to unified view

a/src/internfile/mh_symlink.h b/src/internfile/mh_symlink.h
...
...
34
 * to enable.
34
 * to enable.
35
 */
35
 */
36
class MimeHandlerSymlink : public RecollFilter {
36
class MimeHandlerSymlink : public RecollFilter {
37
 public:
37
 public:
38
    MimeHandlerSymlink(RclConfig *cnf, const std::string& id) 
38
    MimeHandlerSymlink(RclConfig *cnf, const std::string& id) 
39
    : RecollFilter(cnf, id) 
39
    : RecollFilter(cnf, id) {
40
    {
41
    }
40
    }
42
    virtual ~MimeHandlerSymlink() 
41
    virtual ~MimeHandlerSymlink() {}
43
    {
42
44
    }
45
    virtual bool set_document_file(const string& mt, const string& fn) 
46
    {
47
  RecollFilter::set_document_file(mt, fn);
48
  m_fn = fn;
49
  return m_havedoc = true;
50
    }
51
    virtual bool next_document() 
43
    virtual bool next_document() 
52
    {
44
    {
53
    if (m_havedoc == false)
45
    if (m_havedoc == false)
54
        return false;
46
        return false;
55
    m_havedoc = false; 
47
    m_havedoc = false; 
...
...
59
    if (bytes != (ssize_t)-1) {
51
    if (bytes != (ssize_t)-1) {
60
        string slc(lc, bytes);
52
        string slc(lc, bytes);
61
        transcode(path_getsimple(slc), m_metaData[cstr_dj_keycontent], 
53
        transcode(path_getsimple(slc), m_metaData[cstr_dj_keycontent], 
62
              m_config->getDefCharset(true), "UTF-8");
54
              m_config->getDefCharset(true), "UTF-8");
63
    } else {
55
    } else {
64
        LOGDEB("Symlink: readlink ["  << (m_fn) << "] failed, errno "  << (errno) << "\n" );
56
        LOGDEB("Symlink: readlink [" << m_fn << "] failed, errno " <<
57
                   errno << "\n");
65
    }
58
    }
66
    m_metaData[cstr_dj_keymt] = cstr_textplain;
59
    m_metaData[cstr_dj_keymt] = cstr_textplain;
67
    return true;
60
    return true;
68
    }
61
    }
62
protected:
63
    virtual bool set_document_file_impl(const string& mt, const string& fn) {
64
  m_fn = fn;
65
  return m_havedoc = true;
66
    }
67
69
private:
68
private:
70
    std::string m_fn;
69
    std::string m_fn;
71
};
70
};
72
71
73
#endif /* _MH_SYMLINK_H_INCLUDED_ */
72
#endif /* _MH_SYMLINK_H_INCLUDED_ */