jenkins-bot has submitted this change and it was merged.
Change subject: Added missing unlock() calls in LocalFile
......................................................................
Added missing unlock() calls in LocalFile
Change-Id: Id427fb424bfb46670f2074664aca750014c70225
---
M includes/filerepo/file/LocalFile.php
1 file changed, 4 insertions(+), 0 deletions(-)
Approvals:
Chad: Looks good to me, approved
jenkins-bot: Verified
diff --git a/includes/filerepo/file/LocalFile.php
b/includes/filerepo/file/LocalFile.php
index 300e68e..a01895f 100644
--- a/includes/filerepo/file/LocalFile.php
+++ b/includes/filerepo/file/LocalFile.php
@@ -594,6 +594,7 @@
# Don't destroy file info of missing files
if ( !$this->fileExists ) {
+ $this->unlock();
wfDebug( __METHOD__ . ": file does not exist,
aborting\n" );
wfProfileOut( __METHOD__ );
@@ -604,6 +605,7 @@
list( $major, $minor ) = self::splitMime( $this->mime );
if ( wfReadOnly() ) {
+ $this->unlock();
wfProfileOut( __METHOD__ );
return;
@@ -2829,6 +2831,7 @@
// cleanupTarget() to trigger. It would delete the C files and
cause data loss.
$statusDb = $this->doDBUpdates();
if ( !$statusDb->isGood() ) {
+ $destFile->unlock();
$this->file->unlockAndRollback();
$statusDb->ok = false;
@@ -2846,6 +2849,7 @@
if ( !$statusMove->isGood() ) {
// Delete any files copied over (while the destination
is still locked)
$this->cleanupTarget( $triplets );
+ $destFile->unlock();
$this->file->unlockAndRollback(); // unlocks the
destination
wfDebugLog( 'imagemove', "Error in moving files: " .
$statusMove->getWikiText() );
$statusMove->ok = false;
--
To view, visit https://gerrit.wikimedia.org/r/146991
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Id427fb424bfb46670f2074664aca750014c70225
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz <[email protected]>
Gerrit-Reviewer: Chad <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits