From b524f641e5bb413cbc0742232c4efe5beac8b872 Mon Sep 17 00:00:00 2001 From: bshuttle Date: Fri, 21 Apr 2006 17:04:40 +0000 Subject: [PATCH] handle the fact that escapeShellArg on windows can't handle certain filenames. --- plugins/ktstandard/contents/BaseIndexer.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/plugins/ktstandard/contents/BaseIndexer.php b/plugins/ktstandard/contents/BaseIndexer.php index f1b54d6..be45499 100644 --- a/plugins/ktstandard/contents/BaseIndexer.php +++ b/plugins/ktstandard/contents/BaseIndexer.php @@ -88,10 +88,17 @@ class KTBaseIndexerTrigger { $tempstub = $this->command; } $myfilename = tempnam("/tmp", 'kt.' . $tempstub); - $contents = $this->extract_contents($sFile, $myfilename); + $intermediate = tempnam("/tmp", 'kt.' . $tempstub); + if (OS_WINDOWS && !@copy($sFile, $intermediate)) { + return ; + } else { + $intermediate = $sFile; + } - unlink($myfilename); + $contents = $this->extract_contents($intermediate, $myfilename); + unlink($myfilename); + if (OS_WINDOWS) { unlink($intermediate); } if (empty($contents)) { return; } -- libgit2 0.21.4