Pascal Essiembre created TIKA-1620:
--------------------------------------
Summary: OUTPUT_FILE_TOKEN not being replaced in ExternalParser
Key: TIKA-1620
URL: https://issues.apache.org/jira/browse/TIKA-1620
Project: Tika
Issue Type: Bug
Components: parser
Affects Versions: 1.8, 1.7
Environment: Any.
Reporter: Pascal Essiembre
According to class documentation, the
{{org.apache.tika.parser.external.ExternalParser}} class should replace the
{{OUTPUT_FILE_TOKEN}} constant with an output file name when specified as a
command argument. It is currently not the case and the parser will fail to
grab any output from processes generating output files.
In order to fix this, you should add one line to the following code in the
parse method (starting on line 168):
{code:java}
if(cmd[i].indexOf(OUTPUT_FILE_TOKEN) != -1) {
output = tmp.createTemporaryFile();
outputFromStdOut = false;
//START FIX:
cmd[i] = cmd[i].replace(OUTPUT_FILE_TOKEN, output.getPath());
//END FIX.
}
{code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)