Commit cdd65375aadd1b88028efa6246120f8da42b37f8

Authored by conradverm
1 parent 31e51367

KTS-2763

"pdf extractor does not have quotes around application name. this results in pdftotext not being called correcly in windows."
Fixed.

Committed By: Conrad Vermeulen
Reviewed By: Jonathan Byrne

git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@7806 c91229c3-7414-0410-bfa2-8a42b809f60b
search2/indexing/extractorCore.inc.php
... ... @@ -351,12 +351,12 @@ abstract class ExternalDocumentExtractor extends DocumentExtractor
351 351 {
352 352 if (OS_WINDOWS)
353 353 {
354   -
  354 +
355 355  
356 356 $WshShell = new COM("WScript.Shell");
357 357 $res = $WshShell->Run($cmd, 0, true);
358   -
359   -
  358 +
  359 +
360 360 return $res == 0;
361 361 }
362 362 else
... ... @@ -469,7 +469,8 @@ abstract class ApplicationExtractor extends ExternalDocumentExtractor
469 469 {
470 470 $sources = array('{source}','{target}');
471 471 $target = array($this->sourcefile, $this->targetfile);
472   - $cmdline = $this->application . ' ' . str_replace($sources,$target, $this->params);
  472 + $escape = OS_WINDOWS?'"':'\'';
  473 + $cmdline = $escape . $this->application . $escape . ' ' . str_replace($sources,$target, $this->params);
473 474  
474 475 return $cmdline;
475 476 }
... ...