if ( $this->isQuiet() ) {
print $id; // give a single machine-readable number
}
+
return;
}
}
// Periodically update the position file
- $callback = function( $pos ) use ( $startFromPosFile, $posFile, $start ) {
+ $callback = function ( $pos ) use ( $startFromPosFile, $posFile, $start ) {
if ( $startFromPosFile && $pos >= $start ) { // successfully advanced
file_put_contents( $posFile, $pos, LOCK_EX );
}
if ( !$fsFile ) {
$this->error( "Unable to sync '$dPath': could not get local copy." );
$status->fatal( 'backend-fail-internal', $src->getName() );
+
return $status;
}
$fsFiles[] = $fsFile; // keep TempFSFile objects alive as needed
} else { // error
$this->error( "Unable to sync '$dPath': could not stat file." );
$status->fatal( 'backend-fail-internal', $src->getName() );
+
return $status;
}
}
* Substitute the backend name of storage paths with that of a given one
*
* @param array|string $paths List of paths or single string path
+ * @param FileBackend $backend
* @return array|string
*/
protected function replaceNamePaths( $paths, FileBackend $backend ) {