Skip to content

Commit

Permalink
Fix bug in ListDeletedEntries where the PurgeDate was not set correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
Jesse Geens committed Oct 30, 2024
1 parent cf70816 commit a0d6db3
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions pkg/eosclient/eosgrpc/eosgrpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down Expand Up @@ -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}

Expand Down

0 comments on commit a0d6db3

Please sign in to comment.