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
1 changed files with 5 additions and 1 deletions

View File

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