Skip to content

Commit

Permalink
Do not use &internal.ObjAttr when you mean nil!
Browse files Browse the repository at this point in the history
  • Loading branch information
foodprocessor committed Dec 21, 2024
1 parent 2d0e64a commit 730c271
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion component/azstorage/block_blob.go
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@ func (bb *BlockBlob) List(prefix string, marker *string, count int32) ([]*intern
var dirList = make(map[string]bool)
for _, blobInfo := range listBlob.Segment.BlobItems {
blobInfo.Name = bb.getFileName(*blobInfo.Name)
attr := &internal.ObjAttr{}
var attr *internal.ObjAttr
if blobInfo.Properties.CustomerProvidedKeySHA256 != nil && *blobInfo.Properties.CustomerProvidedKeySHA256 != "" {
log.Trace("BlockBlob::List : blob is encrypted with customer provided key so fetching metadata explicitly using REST")
attr, err = bb.getAttrUsingRest(*blobInfo.Name)
Expand Down
2 changes: 1 addition & 1 deletion component/loopback/loopback_fs.go
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ func (lfs *LoopbackFS) GetAttr(options internal.GetAttrOptions) (*internal.ObjAt
info, err := os.Lstat(path)
if err != nil {
log.Err("LoopbackFS::GetAttr : error [%s]", err)
return &internal.ObjAttr{}, err
return nil, err
}
attr := &internal.ObjAttr{
Path: options.Name,
Expand Down

0 comments on commit 730c271

Please sign in to comment.