Let a Working Folder delete a basename.

CheckDNS needs that to Remove Domain without a second storage path.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-09-28 19:31:36 +02:00
co-authored by Cursor
parent 6560dffa69
commit 300484114f
4 changed files with 65 additions and 2 deletions
+14
View File
@@ -56,6 +56,13 @@ func TestWebDAVReadWriteListExists(t *testing.T) {
return
}
w.WriteHeader(http.StatusOK)
case http.MethodDelete:
if _, ok := store[path]; !ok {
http.NotFound(w, r)
return
}
delete(store, path)
w.WriteHeader(http.StatusNoContent)
case "MKCOL":
dirs[strings.TrimSuffix(path, "/")] = true
w.WriteHeader(http.StatusCreated)
@@ -102,6 +109,13 @@ func TestWebDAVReadWriteListExists(t *testing.T) {
if !found {
t.Fatalf("list: %+v", entries)
}
if err := folder.Remove("note.txt"); err != nil {
t.Fatal(err)
}
ok, err = folder.Exists("note.txt")
if err != nil || ok {
t.Fatalf("after remove: ok=%v err=%v", ok, err)
}
}
func TestWebDAVOpenMissingIsNotExist(t *testing.T) {