Skip to content

Commit

Permalink
Revert "Fixed bug where uploads fail due to using cbox as the account…
Browse files Browse the repository at this point in the history
… used for Statting. Instead we use the user now"

A different solution is being developed.

This reverts commit a78f77b.
  • Loading branch information
glpatcern committed Nov 28, 2024
1 parent a9c6c14 commit 4820f8c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
5 changes: 0 additions & 5 deletions changelog/unreleased/fix-failing-stat.md

This file was deleted.

9 changes: 5 additions & 4 deletions pkg/storage/utils/eosfs/eosfs.go
Original file line number Diff line number Diff line change
Expand Up @@ -1233,14 +1233,12 @@ 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())

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

p := ref.Path
fn := fs.wrap(ctx, p)
auth, err := fs.getUserAuth(ctx, u, fn)
auth, err := fs.getRootAuth(ctx)
if err != nil {
return nil, err
}
Expand All @@ -1265,13 +1263,16 @@ 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 4820f8c

Please sign in to comment.