Localisation updates from http://translatewiki.net.
[lhc/web/wiklou.git] / maintenance / copyFileBackend.php
index fddc72c..13301ed 100644 (file)
@@ -21,7 +21,7 @@
  * @ingroup Maintenance
  */
 
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
 
 /**
  * Copy all files in one container of one backend to another.
@@ -56,7 +56,7 @@ class CopyFileBackend extends Maintenance {
                $src = FileBackendGroup::singleton()->get( $this->getOption( 'src' ) );
                $dst = FileBackendGroup::singleton()->get( $this->getOption( 'dst' ) );
                $containers = explode( '|', $this->getOption( 'containers' ) );
-               $subDir = $this->getOption( rtrim( 'subdir', '/' ), '' );
+               $subDir = rtrim( $this->getOption( 'subdir', '' ), '/' );
 
                $rateFile = $this->getOption( 'ratefile' );
 
@@ -190,9 +190,9 @@ class CopyFileBackend extends Maintenance {
                                ? $fsFiles[$srcPath]
                                : $src->getLocalReference( array( 'src' => $srcPath, 'latest' => 1 ) );
                        if ( !$fsFile ) {
-                               if ( $src->fileExists( array( 'src' => $srcPath ) ) === false ) {
+                               $src->clearCache( array( $srcPath ) );
+                               if ( $src->fileExists( array( 'src' => $srcPath, 'latest' => 1 ) ) === false ) {
                                        $this->error( "$wikiId: File '$srcPath' was listed but does not exist." );
-                                       continue;
                                } else {
                                        $this->error( "$wikiId: Could not get local copy of $srcPath." );
                                }