aboutsummaryrefslogtreecommitdiffstats
path: root/includes/filebackend
diff options
context:
space:
mode:
authorAaron Schulz <aschulz@wikimedia.org>2013-03-12 00:50:16 -0700
committerAaron Schulz <aschulz@wikimedia.org>2013-03-12 00:50:16 -0700
commit70eabe29c59a003e296fa9ee9ffbb157682e4755 (patch)
treedbf474011279a402ad7a936290ddf84a2413f034 /includes/filebackend
parent2135b80fcdb17bbde11e62b95ed8386b9c3d69f2 (diff)
downloadmediawikicore-70eabe29c59a003e296fa9ee9ffbb157682e4755.tar.gz
mediawikicore-70eabe29c59a003e296fa9ee9ffbb157682e4755.zip
[FileBackend] Suppress missing container errors with "ignoreMissingSource".
Change-Id: I2b9f4764c4938dcee61f17c31ed4d4b84fbfbcb2
Diffstat (limited to 'includes/filebackend')
-rw-r--r--includes/filebackend/SwiftFileBackend.php12
1 files changed, 9 insertions, 3 deletions
diff --git a/includes/filebackend/SwiftFileBackend.php b/includes/filebackend/SwiftFileBackend.php
index 6357b8631239..0f3d97a31074 100644
--- a/includes/filebackend/SwiftFileBackend.php
+++ b/includes/filebackend/SwiftFileBackend.php
@@ -411,7 +411,9 @@ class SwiftFileBackend extends FileBackendStore {
$sContObj = $this->getContainer( $srcCont );
$dContObj = $this->getContainer( $dstCont );
} catch ( NoSuchContainerException $e ) {
- $status->fatal( 'backend-fail-copy', $params['src'], $params['dst'] );
+ if ( empty( $params['ignoreMissingSource'] ) || isset( $sContObj ) ) {
+ $status->fatal( 'backend-fail-copy', $params['src'], $params['dst'] );
+ }
return $status;
} catch ( CloudFilesException $e ) { // some other exception?
$this->handleException( $e, $status, __METHOD__, $params );
@@ -481,7 +483,9 @@ class SwiftFileBackend extends FileBackendStore {
$sContObj = $this->getContainer( $srcCont );
$dContObj = $this->getContainer( $dstCont );
} catch ( NoSuchContainerException $e ) {
- $status->fatal( 'backend-fail-move', $params['src'], $params['dst'] );
+ if ( empty( $params['ignoreMissingSource'] ) || isset( $sContObj ) ) {
+ $status->fatal( 'backend-fail-move', $params['src'], $params['dst'] );
+ }
return $status;
} catch ( CloudFilesException $e ) { // some other exception?
$this->handleException( $e, $status, __METHOD__, $params );
@@ -557,7 +561,9 @@ class SwiftFileBackend extends FileBackendStore {
} catch ( CDNNotEnabledException $e ) {
// CDN not enabled; nothing to see here
} catch ( NoSuchContainerException $e ) {
- $status->fatal( 'backend-fail-delete', $params['src'] );
+ if ( empty( $params['ignoreMissingSource'] ) ) {
+ $status->fatal( 'backend-fail-delete', $params['src'] );
+ }
} catch ( NoSuchObjectException $e ) {
if ( empty( $params['ignoreMissingSource'] ) ) {
$status->fatal( 'backend-fail-delete', $params['src'] );