From 02076f01a6efd43622dc1fe9bf04c022d731719a Mon Sep 17 00:00:00 2001 From: guosj <515878133@qq.com> Date: Mon, 28 Mar 2022 14:50:48 +0800 Subject: [PATCH] fix tagging error --- weed/server/filer_server_handlers_tagging.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/weed/server/filer_server_handlers_tagging.go b/weed/server/filer_server_handlers_tagging.go index 1da7ff50f..da6ecc638 100644 --- a/weed/server/filer_server_handlers_tagging.go +++ b/weed/server/filer_server_handlers_tagging.go @@ -81,8 +81,10 @@ func (fs *FilerServer) DeleteTaggingHandler(w http.ResponseWriter, r *http.Reque // parse out tags to be deleted toDelete := strings.Split(r.URL.Query().Get("tagging"), ",") deletions := make(map[string]struct{}) - for _, deletion := range toDelete { - deletions[deletion] = struct{}{} + if !(len(toDelete) == 1 && toDelete[0] == "") { + for _, deletion := range toDelete { + deletions[deletion] = struct{}{} + } } // delete all tags or specific tags