From f0bdb776744994047d80a3275c95f92f581784f2 Mon Sep 17 00:00:00 2001 From: liuyonghui Date: Wed, 15 Dec 2021 15:08:47 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20DoUnlock=E7=A9=BA?= =?UTF-8?q?=E6=8C=87=E9=92=88=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/net/sf/webdav/methods/DoUnlock.java | 5 +++++ 1 file changed, 5 insertions(+) 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); }