Index: trunk/extensions/TimedMediaHandler/WebVideoTranscode/WebVideoTranscodeJob.php |
— | — | @@ -190,8 +190,6 @@ |
191 | 191 | ); |
192 | 192 | WebVideoTranscode::invalidatePagesWithFile( $this->title ); |
193 | 193 | } |
194 | | - //remove temoprary file in any case |
195 | | - unlink( $this->getTargetEncodePath() ); |
196 | 194 | } else { |
197 | 195 | // Update the transcode table with failure time and error |
198 | 196 | $dbw->update( |
— | — | @@ -211,6 +209,10 @@ |
212 | 210 | // just clear the file page ( so that the transcode table shows the error ) |
213 | 211 | $this->title->invalidateCache(); |
214 | 212 | } |
| 213 | + //remove temoprary file in any case |
| 214 | + if( is_file( $this->getTargetEncodePath() ) ) { |
| 215 | + unlink( $this->getTargetEncodePath() ); |
| 216 | + } |
215 | 217 | // Clear the webVideoTranscode cache ( so we don't keep out dated table cache around ) |
216 | 218 | webVideoTranscode::clearTranscodeCache( $this->title->getDBkey() ); |
217 | 219 | |