forked from TrueCloudLab/frostfs-s3-gw
[#510] Fix listing with prefix
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
This commit is contained in:
parent
3f5afabd4a
commit
cb5237fb82
1 changed files with 2 additions and 2 deletions
|
@ -563,7 +563,7 @@ func (c *TreeClient) GetLatestVersionsByPrefix(ctx context.Context, cnrID *cid.I
|
|||
func (c *TreeClient) determinePrefixNode(ctx context.Context, cnrID *cid.ID, treeID, prefix string) (uint64, string, error) {
|
||||
var rootID uint64
|
||||
path := strings.Split(prefix, separator)
|
||||
if path[0] == "" {
|
||||
if len(path) > 1 && path[0] == "" {
|
||||
path[0] = emptyFileName
|
||||
}
|
||||
tailPrefix := path[len(path)-1]
|
||||
|
@ -594,7 +594,7 @@ func (c *TreeClient) getPrefixNodeID(ctx context.Context, cnrID *cid.ID, treeID
|
|||
|
||||
var intermediateNodes []uint64
|
||||
for _, node := range nodes {
|
||||
if !isIntermediate(node) {
|
||||
if isIntermediate(node) {
|
||||
intermediateNodes = append(intermediateNodes, node.GetNodeId())
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue