Skip to content

Commit

Permalink
Return storageprovider id in space root info
Browse files Browse the repository at this point in the history
Signed-off-by: Jörn Friedrich Dreyer <[email protected]>
  • Loading branch information
butonic committed Oct 16, 2024
1 parent a00ef94 commit 285c52e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions changelog/unreleased/fix-propfind-root-id.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Bugfix: Fix propfind root id

decomposedfs now returns the storageprovider id in the root info when listing spaces

https://github.com/cs3org/reva/pull/4000
3 changes: 3 additions & 0 deletions internal/grpc/services/storageprovider/storageprovider.go
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,7 @@ func (s *Service) CreateStorageSpace(ctx context.Context, req *provider.CreateSt
}

s.addMissingStorageProviderID(resp.GetStorageSpace().GetRoot(), resp.GetStorageSpace().GetId())
s.addMissingStorageProviderID(resp.GetStorageSpace().GetRootInfo().GetId(), nil)
return resp, nil
}

Expand Down Expand Up @@ -589,6 +590,7 @@ func (s *Service) ListStorageSpaces(ctx context.Context, req *provider.ListStora
}

s.addMissingStorageProviderID(sp.GetRoot(), sp.GetId())
s.addMissingStorageProviderID(sp.GetRootInfo().GetId(), nil)
}

return &provider.ListStorageSpacesResponse{
Expand All @@ -608,6 +610,7 @@ func (s *Service) UpdateStorageSpace(ctx context.Context, req *provider.UpdateSt
return nil, err
}
s.addMissingStorageProviderID(res.GetStorageSpace().GetRoot(), res.GetStorageSpace().GetId())
s.addMissingStorageProviderID(res.GetStorageSpace().GetRootInfo().GetId(), nil)
return res, nil
}

Expand Down

0 comments on commit 285c52e

Please sign in to comment.