diff --git a/src/qtgui/confgui/confguiindex.cpp b/src/qtgui/confgui/confguiindex.cpp index 8d7de6a8..82002c3d 100644 --- a/src/qtgui/confgui/confguiindex.cpp +++ b/src/qtgui/confgui/confguiindex.cpp @@ -388,6 +388,18 @@ ConfSubPanelW::ConfSubPanelW(QWidget *parent, ConfNull *config) vboxLayout->addWidget(m_groupbox); subDirChanged(); + + ConfLink lnkfiltmaxsecs(new ConfLinkRclRep(config, "filtermaxseconds")); + ConfParamIntW *efiltmaxsecs = new + ConfParamIntW(m_groupbox, lnkfiltmaxsecs, + tr("Max. filter exec. time (S)"), + tr("External filters working longer than this will be " + "aborted. This is for the rare case (ie: postscript) " + "where a document could cause a filter to loop" + "Set to -1 for no limit.\n"), + -1, 10000); + m_widgets.push_back(efiltmaxsecs); + } void ConfSubPanelW::reloadAll() diff --git a/src/sampleconf/recoll.conf.in b/src/sampleconf/recoll.conf.in index 825ddf85..63e9297f 100644 --- a/src/sampleconf/recoll.conf.in +++ b/src/sampleconf/recoll.conf.in @@ -113,6 +113,10 @@ textfilemaxmbs = -1 # piece into the preview window. Might be useful for big logs textfilepagekbs = -1 +# Maximum external filter execution time. Default 20mn. This is mainly +# to avoid infinite loops in postscript files (loop.ps) +filtermaxseconds = 1200 + # Length of abstracts we store while indexing. Longer will make for a # bigger db # idxabsmlen = 250