Fix r108185: file transform store op needs 'overwriteDest'
authorAaron Schulz <aaron@users.mediawiki.org>
Mon, 9 Jan 2012 21:21:40 +0000 (21:21 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Mon, 9 Jan 2012 21:21:40 +0000 (21:21 +0000)
includes/filerepo/file/File.php

index 2554af5..c9dd775 100644 (file)
@@ -811,12 +811,13 @@ abstract class File {
                        // FileRepo::store(); getThumbPath() uses a different zone in some subclasses.
                        $backend->prepare( array( 'dir' => dirname( $thumbPath ) ) );
                        $status = $backend->store(
-                               array( 'src' => $tmpThumbPath, 'dst' => $thumbPath ),
+                               array( 'src' => $tmpThumbPath, 'dst' => $thumbPath, 'overwriteDest' => 1 ),
                                array( 'force' => 1, 'nonLocking' => 1, 'allowStale' => 1 )
                        );
                        if ( $status->isOK() ) {
                                $thumb->setStoragePath( $thumbPath );
                        } else {
+                               var_dump($status->errors);
                                $thumb = $this->transformErrorOutput( $thumbPath, $thumbUrl, $params, $flags );
                        }
                }