Browse Source

fix: 🐛 DoUnlock空指针异常

main
liuyonghui 3 years ago
parent
commit
f0bdb77674
  1. 5
      src/main/java/net/sf/webdav/methods/DoUnlock.java

5
src/main/java/net/sf/webdav/methods/DoUnlock.java

@ -72,6 +72,11 @@ public class DoUnlock extends DeterminableMethod { @@ -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);
}

Loading…
Cancel
Save