From 06f23aa6759155a6d5b713d8704a90e2e2d246d8 Mon Sep 17 00:00:00 2001 From: elee Date: Fri, 18 Mar 2022 00:29:48 -0500 Subject: [PATCH] put in delete folder children query --- weed/filer/arangodb/arangodb_store.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/weed/filer/arangodb/arangodb_store.go b/weed/filer/arangodb/arangodb_store.go index c1445f026..23aefe40f 100644 --- a/weed/filer/arangodb/arangodb_store.go +++ b/weed/filer/arangodb/arangodb_store.go @@ -292,7 +292,10 @@ func (store *ArangodbStore) DeleteEntry(ctx context.Context, fullpath util.FullP func (store *ArangodbStore) DeleteFolderChildren(ctx context.Context, fullpath util.FullPath) error { var query string - query = query + fmt.Sprintf(`filter starts_with(d.directory, "%s") remove d._key in files`, + query = query + fmt.Sprintf(` + for d in files + filter starts_with(d.directory, "%s/") || d.directory == "%s" + remove d._key in files`, strings.Join(strings.Split(string(fullpath), "/"), ","), string(fullpath), )