mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/ConfirmEdit
synced 2024-11-12 01:11:15 +00:00
Actually create directories before using store operations.
Change-Id: I69a6b84f2f989fbe4cdd35ba75f25a4a26406347
This commit is contained in:
parent
3b987fb098
commit
099b318d61
|
@ -105,9 +105,11 @@ class GenerateFancyCaptchas extends Maintenance {
|
|||
continue;
|
||||
}
|
||||
list( $salt, $hash ) = $instance->hashFromImageName( $fileInfo->getBasename() );
|
||||
$dest = $instance->imagePath( $salt, $hash );
|
||||
$backend->prepare( array( 'dir' => dirname( $dest ) ) );
|
||||
$status = $backend->quickStore( array(
|
||||
'src' => $fileInfo->getPathname(),
|
||||
'dst' => $instance->imagePath( $salt, $hash )
|
||||
'dst' => $dest
|
||||
) );
|
||||
if ( !$status->isOK() ) {
|
||||
$this->error( "Could not save file '{$fileInfo->getPathname()}'.\n" );
|
||||
|
|
Loading…
Reference in a new issue