r110113 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r110112‎ | r110113 | r110114 >
Date:11:14, 27 January 2012
Author:j
Status:ok
Tags:miscextensions 
Comment:
also remove temp file if its 0 bytes
Modified paths:
  • /trunk/extensions/TimedMediaHandler/WebVideoTranscode/WebVideoTranscodeJob.php (modified) (history)

Diff [purge]

Index: trunk/extensions/TimedMediaHandler/WebVideoTranscode/WebVideoTranscodeJob.php
@@ -190,8 +190,6 @@
191191 );
192192 WebVideoTranscode::invalidatePagesWithFile( $this->title );
193193 }
194 - //remove temoprary file in any case
195 - unlink( $this->getTargetEncodePath() );
196194 } else {
197195 // Update the transcode table with failure time and error
198196 $dbw->update(
@@ -211,6 +209,10 @@
212210 // just clear the file page ( so that the transcode table shows the error )
213211 $this->title->invalidateCache();
214212 }
 213+ //remove temoprary file in any case
 214+ if( is_file( $this->getTargetEncodePath() ) ) {
 215+ unlink( $this->getTargetEncodePath() );
 216+ }
215217 // Clear the webVideoTranscode cache ( so we don't keep out dated table cache around )
216218 webVideoTranscode::clearTranscodeCache( $this->title->getDBkey() );
217219

Status & tagging log