From a4991af5a0c36febe40122e9fe7bcbe9f583502c Mon Sep 17 00:00:00 2001 From: Conrad Vermeulen Date: Tue, 11 Dec 2007 07:37:20 +0000 Subject: [PATCH] KTS-2763 "pdf extractor does not have quotes around application name. this results in pdftotext not being called correcly in windows." Fixed. --- search2/indexing/extractorCore.inc.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/search2/indexing/extractorCore.inc.php b/search2/indexing/extractorCore.inc.php index f7e527c..161142b 100755 --- a/search2/indexing/extractorCore.inc.php +++ b/search2/indexing/extractorCore.inc.php @@ -351,12 +351,12 @@ abstract class ExternalDocumentExtractor extends DocumentExtractor { if (OS_WINDOWS) { - + $WshShell = new COM("WScript.Shell"); $res = $WshShell->Run($cmd, 0, true); - - + + return $res == 0; } else @@ -469,7 +469,8 @@ abstract class ApplicationExtractor extends ExternalDocumentExtractor { $sources = array('{source}','{target}'); $target = array($this->sourcefile, $this->targetfile); - $cmdline = $this->application . ' ' . str_replace($sources,$target, $this->params); + $escape = OS_WINDOWS?'"':'\''; + $cmdline = $escape . $this->application . $escape . ' ' . str_replace($sources,$target, $this->params); return $cmdline; } -- libgit2 0.21.4