Wednesday 20 February 2013 10:30:41 am

Hi Paul,

I just discovered a bug in the extension eZTika when launching a multi-threaded indexing, creates temporary files of type "eztika_xxxxxxx.txt" are no longer unique because only the "mktime" is used. Here is a very simple patch.

 --- extension/eztika/classes/datatypes/ezbinaryfile/plugins/ezmultiparser.php
+++ extension/eztika/classes/datatypes/ezbinaryfile/plugins/ezmultiparser.php
@@ -67,7 +67,7 @@         
$binaryINI = eZINI::instance( 'binaryfile.ini' );         
$textExtractionTool = $binaryINI->variable( 'MultiHandlerSettings', 'TextExtractionTool' ); 
-        $startTime = mktime();
+       $startTime = mktime() + $fileName;
          
         $tmpName = eZSys::cacheDirectory() . eZSys::fileSeparator(). 'eztika_'. md5( $startTime ) . '.txt';         
         $handle = fopen( $tmpName, "w" );

Modified on Wednesday 20 February 2013 10:34:08 am by Ghandri Hamza

You must be logged in to post messages in this topic!