handle notfound exceptions in lock plugin

This commit is contained in:
Robin Appelman 2015-08-12 14:13:03 +02:00 committed by Thomas Müller
parent 17b671ee25
commit b424151459

View file

@ -85,7 +85,11 @@ class LockPlugin extends ServerPlugin {
if ($request->getMethod() !== 'PUT') { if ($request->getMethod() !== 'PUT') {
return; return;
} }
$node = $this->tree->getNodeForPath($request->getPath()); try {
$node = $this->tree->getNodeForPath($request->getPath());
} catch (NotFound $e) {
return;
}
if ($node instanceof Node) { if ($node instanceof Node) {
$node->releaseLock(ILockingProvider::LOCK_SHARED); $node->releaseLock(ILockingProvider::LOCK_SHARED);
} }