Branch: Tag:

2003-01-20

2003-01-20 17:39:14 by Jonas Wallden <jonasw@roxen.com>

Set working directory before running external processes. This should solve
a problem where the PDF extractor couldn't locate gzip.exe.

Rev: lib/modules/Search.pmod/Filter.pmod/Base.pike:1.14
Rev: lib/modules/Search.pmod/Filter.pmod/PDF.pmod:1.12
Rev: lib/modules/Search.pmod/Filter.pmod/Word.pmod:1.9

1:   // This file is part of Roxen Search   // Copyright © 2001 Roxen IS. All rights reserved.   // - // $Id: Word.pmod,v 1.8 2001/11/19 13:33:15 js Exp $ + // $Id: Word.pmod,v 1.9 2003/01/20 17:39:14 jonasw Exp $      inherit Search.Filter.HTML;   
24:    fn, r, sizeof(data));       string text; +  string bin = combine_path(getcwd(), "modules/search/bin/wvWare"); +  string cwd = combine_path(getcwd(), "modules/search/bin"); +  string xml = combine_path(getcwd(), "modules/search/pike-modules/" +  "Search.pmod/Filter.pmod/wvHtml.xml"); +  string doc = combine_path(getcwd(), fn);    mixed err = catch    { -  text = my_popen(({ "modules/search/bin/wvWare", -  "-c", "utf-8", -  "-x", "modules/search/pike-modules/Search.pmod/Filter.pmod/wvHtml.xml", -  fn })); +  text = my_popen( ({ bin, "-c", "utf-8", "-x", xml, doc }), cwd);    };    if(!rm(fn))    werror("Search: Failed to remove temporary file: %s\n", fn);