Skip to content

Commit 694cbbe

Browse files
committed
Add correct mountID to resource parentID
1 parent 65dcc61 commit 694cbbe

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

storage/eoshomewrapper/eoshomewrapper.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,8 @@ func (w *wrapper) GetMD(ctx context.Context, ref *provider.Reference, mdKeys []s
9494
// Take the first letter of the username of the logged-in user, as the home
9595
// storage provider restricts requests only to the home namespace.
9696
res.Id.StorageId = w.getMountID(ctx, res)
97+
res.ParentId.StorageId = w.getMountID(ctx, res)
98+
9799
return res, nil
98100
}
99101

@@ -104,6 +106,7 @@ func (w *wrapper) ListFolder(ctx context.Context, ref *provider.Reference, mdKey
104106
}
105107
for _, r := range res {
106108
r.Id.StorageId = w.getMountID(ctx, r)
109+
r.ParentId.StorageId = w.getMountID(ctx, r)
107110
}
108111
return res, nil
109112
}

storage/eoswrapper/eoswrapper.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ func (w *wrapper) GetMD(ctx context.Context, ref *provider.Reference, mdKeys []s
113113
// Take the first letter of the resource path after the namespace has been removed.
114114
// If it's empty, leave it empty to be filled by storageprovider.
115115
res.Id.StorageId = w.getMountID(ctx, res)
116+
res.ParentId.StorageId = w.getMountID(ctx, res)
116117

117118
if err = w.setProjectSharingPermissions(ctx, res); err != nil {
118119
return nil, err
@@ -128,6 +129,7 @@ func (w *wrapper) ListFolder(ctx context.Context, ref *provider.Reference, mdKey
128129
}
129130
for _, r := range res {
130131
r.Id.StorageId = w.getMountID(ctx, r)
132+
r.ParentId.StorageId = w.getMountID(ctx, r)
131133
if err = w.setProjectSharingPermissions(ctx, r); err != nil {
132134
continue
133135
}

0 commit comments

Comments
 (0)