Skip to content

Commit

Permalink
address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
David Christofas committed Jun 17, 2021
1 parent 07a4d39 commit ea4cf92
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,7 @@ func (h *Handler) listSharesWithMe(w http.ResponseWriter, r *http.Request) {
var info *provider.ResourceInfo
if pinfo != nil {
// check if the shared resource matches the path resource
if !utils.ResourceEqual(&provider.Reference{ResourceId: rs.Share.ResourceId}, &provider.Reference{ResourceId: pinfo.Id}) {
if !utils.ResourceIDEqual(rs.Share.ResourceId, pinfo.Id) {
// try next share
continue
}
Expand Down
3 changes: 1 addition & 2 deletions pkg/storage/fs/owncloud/owncloud.go
Original file line number Diff line number Diff line change
Expand Up @@ -801,8 +801,7 @@ func (fs *ocfs) resolve(ctx context.Context, ref *provider.Reference) (string, e
if err != nil {
return "", err
}
filepath.Join("/", ip, filepath.Join("/", ref.Path))
return ip, nil
return filepath.Join("/", ip, filepath.Join("/", ref.Path)), nil
}

// use a path
Expand Down
2 changes: 1 addition & 1 deletion pkg/storage/fs/s3/s3.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ func (fs *s3FS) resolve(ctx context.Context, ref *provider.Reference) (string, e
return fs.addRoot(ref.GetPath()), nil
}

if ref.ResourceId.OpaqueId != "" {
if ref.ResourceId != nil {
fn := path.Join("/", strings.TrimPrefix(ref.ResourceId.OpaqueId, "fileid-"))
fn = fs.addRoot(fn)
return fn, nil
Expand Down

0 comments on commit ea4cf92

Please sign in to comment.