summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-10-08 13:39:34 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2015-10-08 13:39:34 +0200
commitfd5636cda7b4bf752cf34648a0c2b672a586e818 (patch)
tree910a7e9e828a815cd7038f0aa93083ec2114ce34 /lib
parent2fda4e38e21f1dc0fffdc17dfd2dce1ee67da243 (diff)
parent336a12742624652e88f9a4f51bad9d0321c789ac (diff)
downloadnextcloud-server-fd5636cda7b4bf752cf34648a0c2b672a586e818.tar.gz
nextcloud-server-fd5636cda7b4bf752cf34648a0c2b672a586e818.zip
Merge pull request #19644 from owncloud/issue-19617-catch-exception-when-cleaning-locks
Catch "missing table" exception when cleaning up locks
Diffstat (limited to 'lib')
-rw-r--r--lib/private/lock/dblockingprovider.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/private/lock/dblockingprovider.php b/lib/private/lock/dblockingprovider.php
index aa1357982a2..1e93a6cec6c 100644
--- a/lib/private/lock/dblockingprovider.php
+++ b/lib/private/lock/dblockingprovider.php
@@ -185,6 +185,13 @@ class DBLockingProvider extends AbstractLockingProvider {
}
public function __destruct() {
- $this->cleanEmptyLocks();
+ try {
+ $this->cleanEmptyLocks();
+ } catch (\PDOException $e) {
+ // If the table is missing, the clean up was successful
+ if ($this->connection->tableExists('file_locks')) {
+ throw $e;
+ }
+ }
}
}