Commit a4991af5a0c36febe40122e9fe7bcbe9f583502c
1 parent
388d7e2f
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
Showing
1 changed file
with
5 additions
and
4 deletions
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 | } | ... | ... |