summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@owncloud.com>2015-10-08 11:35:57 +0200
committerJoas Schilling <nickvergessen@owncloud.com>2015-10-08 11:37:51 +0200
commit336a12742624652e88f9a4f51bad9d0321c789ac (patch)
treeed42a81a214bbdc40b81bd72eb9c8374dd83c25f /lib
parent33cf1c3c92f6d9b4fcf2375a894e2922b948c6e3 (diff)
downloadnextcloud-server-336a12742624652e88f9a4f51bad9d0321c789ac.tar.gz
nextcloud-server-336a12742624652e88f9a4f51bad9d0321c789ac.zip
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;
+ }
+ }
}
}