diff --git a/src/main/java/net/sf/webdav/methods/DoUnlock.java b/src/main/java/net/sf/webdav/methods/DoUnlock.java index a5fe3c9..4c9ebc6 100644 --- a/src/main/java/net/sf/webdav/methods/DoUnlock.java +++ b/src/main/java/net/sf/webdav/methods/DoUnlock.java @@ -72,6 +72,11 @@ public class DoUnlock extends DeterminableMethod { if (_resourceLocks.unlock(transaction, lockId, owner)) { StoredObject so = _store.getStoredObject( transaction, path); + if (so == null) { + resp.sendError(HttpServletResponse.SC_NOT_FOUND); + return; + } + if (so.isNullResource()) { _store.removeObject(transaction, path); }