https://www.mediawiki.org/wiki/Special:Code/MediaWiki/110113

Revision: 110113
Author:   j
Date:     2012-01-27 11:14:21 +0000 (Fri, 27 Jan 2012)
Log Message:
-----------
also remove temp file if its 0 bytes

Modified Paths:
--------------
    
trunk/extensions/TimedMediaHandler/WebVideoTranscode/WebVideoTranscodeJob.php

Modified: 
trunk/extensions/TimedMediaHandler/WebVideoTranscode/WebVideoTranscodeJob.php
===================================================================
--- 
trunk/extensions/TimedMediaHandler/WebVideoTranscode/WebVideoTranscodeJob.php   
    2012-01-27 11:13:06 UTC (rev 110112)
+++ 
trunk/extensions/TimedMediaHandler/WebVideoTranscode/WebVideoTranscodeJob.php   
    2012-01-27 11:14:21 UTC (rev 110113)
@@ -190,8 +190,6 @@
                                );
                                WebVideoTranscode::invalidatePagesWithFile( 
$this->title );
                        }
-                       //remove temoprary file in any case
-                       unlink( $this->getTargetEncodePath() );
                } else {
                        // Update the transcode table with failure time and 
error
                        $dbw->update(
@@ -211,6 +209,10 @@
                        // just clear the file page ( so that the transcode 
table shows the error )
                        $this->title->invalidateCache();
                }
+               //remove temoprary file in any case
+               if( is_file( $this->getTargetEncodePath() ) ) {
+                       unlink( $this->getTargetEncodePath() );
+               }
                // Clear the webVideoTranscode cache ( so we don't keep out 
dated table cache around )
                webVideoTranscode::clearTranscodeCache( 
$this->title->getDBkey() );
 


_______________________________________________
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to