Skip to content

Commit

Permalink
Fixed bug where uploads fail due to using cbox as the account used fo…
Browse files Browse the repository at this point in the history
…r Statting. Instead we use the user now
  • Loading branch information
Jesse Geens committed Nov 22, 2024
1 parent c71d70c commit bf2f688
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions pkg/storage/utils/eosfs/eosfs.go
Original file line number Diff line number Diff line change
Expand Up @@ -1232,12 +1232,14 @@ func (fs *eosfs) GetMD(ctx context.Context, ref *provider.Reference, mdKeys []st
log := appctx.GetLogger(ctx)
log.Info().Msg("eosfs: get md for ref:" + ref.String())

_, err := getUser(ctx)
u, err := getUser(ctx)
if err != nil {
return nil, err
}

auth, err := fs.getRootAuth(ctx)
p := ref.Path
fn := fs.wrap(ctx, p)
auth, err := fs.getUserAuth(ctx, u, fn)
if err != nil {
return nil, err
}
Expand All @@ -1262,16 +1264,13 @@ func (fs *eosfs) GetMD(ctx context.Context, ref *provider.Reference, mdKeys []st
return fs.convertToResourceInfo(ctx, eosFileInfo)
}

p := ref.Path

// if path is home we need to add in the response any shadow folder in the shadow homedirectory.
if fs.conf.EnableHome {
if fs.isShareFolder(ctx, p) {
return fs.getMDShareFolder(ctx, p, mdKeys)
}
}

fn := fs.wrap(ctx, p)
eosFileInfo, err := fs.c.GetFileInfoByPath(ctx, auth, fn)
if err != nil {
return nil, err
Expand Down

0 comments on commit bf2f688

Please sign in to comment.