From a0d6db31b0cea3f2f9b380380b7bcf9bc6edc7d4 Mon Sep 17 00:00:00 2001 From: Jesse Geens Date: Wed, 30 Oct 2024 10:46:11 +0100 Subject: [PATCH] Fix bug in ListDeletedEntries where the PurgeDate was not set correctly --- pkg/eosclient/eosgrpc/eosgrpc.go | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/pkg/eosclient/eosgrpc/eosgrpc.go b/pkg/eosclient/eosgrpc/eosgrpc.go index c1a7424851..22f46e590c 100644 --- a/pkg/eosclient/eosgrpc/eosgrpc.go +++ b/pkg/eosclient/eosgrpc/eosgrpc.go @@ -47,8 +47,8 @@ import ( ) const ( - versionPrefix = ".sys.v#." - favoritesKey = "http://owncloud.org/ns/favorite" + versionPrefix = ".sys.v#." + favoritesKey = "http://owncloud.org/ns/favorite" ) const ( @@ -1416,14 +1416,13 @@ func (c *Client) ListDeletedEntries(ctx context.Context, auth eosclient.Authoriz ret := make([]*eosclient.DeletedEntry, 0) count := 0 - for d := to; !d.Before(to); d = d.AddDate(0, 0, -1) { + for d := to; !d.Before(from); d = d.AddDate(0, 0, -1) { msg := new(erpc.NSRequest_RecycleRequest) msg.Cmd = erpc.NSRequest_RecycleRequest_RECYCLE_CMD(erpc.NSRequest_RecycleRequest_RECYCLE_CMD_value["LIST"]) - msg.Purgedate = new(erpc.NSRequest_RecycleRequest_PurgeDate) - msg.Purgedate.Day = int32(d.Day()) - msg.Purgedate.Month = int32(d.Month()) - msg.Purgedate.Year = int32(d.Year()) msg.Listflag = new(erpc.NSRequest_RecycleRequest_ListFlags) + msg.Listflag.Day = int32(d.Day()) + msg.Listflag.Month = int32(d.Month()) + msg.Listflag.Year = int32(d.Year()) msg.Listflag.Maxentries = int32(maxentries + 1) rq.Command = &erpc.NSRequest_Recycle{Recycle: msg}