Skip to content

Conversation

@icewind1991
Copy link
Member

Found while investigating other lock issues

Signed-off-by: Robin Appelman <robin@icewind.nl>
@icewind1991 icewind1991 added the 3. to review Waiting for reviews label May 4, 2018
@icewind1991 icewind1991 added this to the Nextcloud 14 milestone May 4, 2018
@icewind1991 icewind1991 requested review from MorrisJobke and rullzer May 4, 2018 16:06
} finally {
if ($lock) {
if ($this->storage->instanceOfStorage('\OCP\Files\Storage\ILockingStorage')) {
$this->storage->releaseLock($path, ILockingProvider::LOCK_SHARED, $this->lockingProvider);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makes php EA go mimimi,

Unhandled exception in finally causes unexpected behaviour in various php versions,

whatever that means

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems to work on the versions we support: https://3v4l.org/cG66R

And it is better than nowadays - so go for this way.

@MorrisJobke MorrisJobke merged commit 6b6d522 into master May 23, 2018
@MorrisJobke MorrisJobke deleted the scanner-error-lock-cleanup branch May 23, 2018 18:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants