Skip to content

Commit

Permalink
Handle listing of expired shares
Browse files Browse the repository at this point in the history
  • Loading branch information
ishank011 committed Sep 3, 2020
1 parent 6cfe5a9 commit 7d9df99
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions internal/grpc/services/gateway/storageprovider.go
Original file line number Diff line number Diff line change
Expand Up @@ -1318,11 +1318,10 @@ func (s *svc) ListContainer(ctx context.Context, req *provider.ListContainerRequ
}

if protocol == "webdav" {
info, err = s.webdavRefStat(ctx, ref.Target)
if err != nil {
return &provider.ListContainerResponse{
Status: status.NewInternal(ctx, err, "gateway: error resolving webdav reference: "+ref.Target),
}, nil
webdavInfo, err := s.webdavRefStat(ctx, ref.Target)
if err == nil {
// Might be the case that the webdav token has expired. In that case, use the reference's info
info = webdavInfo
}
}

Expand Down

1 comment on commit 7d9df99

@glpatcern
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry if this is non pertinent, but shouldn't that be:

if err != nil {
    webdavInfo = info
}

Please sign in to comment.