export RECOLL_CONFDIR to filters
This commit is contained in:
parent
6a5cc1b7fe
commit
77cba9d0b3
@ -100,6 +100,7 @@ bool MimeHandlerExec::next_document()
|
|||||||
ExecCmd mexec;
|
ExecCmd mexec;
|
||||||
MEAdv adv(filtermaxseconds);
|
MEAdv adv(filtermaxseconds);
|
||||||
mexec.setAdvise(&adv);
|
mexec.setAdvise(&adv);
|
||||||
|
mexec.putenv("RECOLL_CONFDIR", m_config->getConfDir());
|
||||||
mexec.putenv(m_forPreview ? "RECOLL_FILTER_FORPREVIEW=yes" :
|
mexec.putenv(m_forPreview ? "RECOLL_FILTER_FORPREVIEW=yes" :
|
||||||
"RECOLL_FILTER_FORPREVIEW=no");
|
"RECOLL_FILTER_FORPREVIEW=no");
|
||||||
|
|
||||||
|
|||||||
@ -18,6 +18,7 @@
|
|||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
#include "cstr.h"
|
#include "cstr.h"
|
||||||
#include "mh_execm.h"
|
#include "mh_execm.h"
|
||||||
@ -33,10 +34,6 @@
|
|||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/wait.h>
|
#include <sys/wait.h>
|
||||||
|
|
||||||
#ifndef NO_NAMESPACES
|
|
||||||
using namespace std;
|
|
||||||
#endif /* NO_NAMESPACES */
|
|
||||||
|
|
||||||
bool MimeHandlerExecMultiple::startCmd()
|
bool MimeHandlerExecMultiple::startCmd()
|
||||||
{
|
{
|
||||||
LOGDEB(("MimeHandlerExecMultiple::startCmd\n"));
|
LOGDEB(("MimeHandlerExecMultiple::startCmd\n"));
|
||||||
@ -56,6 +53,7 @@ bool MimeHandlerExecMultiple::startCmd()
|
|||||||
oss << "RECOLL_FILTER_MAXMEMBERKB=" << m_maxmemberkb;
|
oss << "RECOLL_FILTER_MAXMEMBERKB=" << m_maxmemberkb;
|
||||||
m_cmd.putenv(oss.str());
|
m_cmd.putenv(oss.str());
|
||||||
|
|
||||||
|
m_cmd.putenv("RECOLL_CONFDIR", m_config->getConfDir());
|
||||||
m_cmd.putenv(m_forPreview ? "RECOLL_FILTER_FORPREVIEW=yes" :
|
m_cmd.putenv(m_forPreview ? "RECOLL_FILTER_FORPREVIEW=yes" :
|
||||||
"RECOLL_FILTER_FORPREVIEW=no");
|
"RECOLL_FILTER_FORPREVIEW=no");
|
||||||
|
|
||||||
|
|||||||
@ -102,6 +102,13 @@ void ExecCmd::putenv(const string &ea)
|
|||||||
{
|
{
|
||||||
m_env.push_back(ea);
|
m_env.push_back(ea);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ExecCmd::putenv(const string &name, const string& value)
|
||||||
|
{
|
||||||
|
string ea = name + "=" + value;
|
||||||
|
putenv(ea);
|
||||||
|
}
|
||||||
|
|
||||||
static void msleep(int millis)
|
static void msleep(int millis)
|
||||||
{
|
{
|
||||||
struct timespec spec;
|
struct timespec spec;
|
||||||
|
|||||||
@ -86,6 +86,7 @@ class ExecCmd {
|
|||||||
* @param envassign an environment assignment string ("name=value")
|
* @param envassign an environment assignment string ("name=value")
|
||||||
*/
|
*/
|
||||||
void putenv(const string &envassign);
|
void putenv(const string &envassign);
|
||||||
|
void putenv(const string &name, const string& value);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set function objects to call whenever new data is available or on
|
* Set function objects to call whenever new data is available or on
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user