@@ -857,6 +857,17 @@ func (fs *Goofys) LookUpInodeMaybeDir(parent *Inode, name string, fullName strin
857857 inode = NewInode (parent , & name , & fullName , fs .flags )
858858 inode .Attributes = & fs .rootAttrs
859859 inode .KnownSize = & inode .Attributes .Size
860+ if len (resp .Contents ) != 0 && * resp .Contents [0 ].Key == name + "/" {
861+ // it's actually a dir blob
862+ entry := resp .Contents [0 ]
863+ if entry .ETag != nil {
864+ inode .s3Metadata ["etag" ] = []byte (* entry .ETag )
865+ }
866+ if entry .StorageClass != nil {
867+ inode .s3Metadata ["storage-class" ] = []byte (* entry .StorageClass )
868+ }
869+
870+ }
860871 // if cheap is not on, the dir blob
861872 // could exist but this returned first
862873 if fs .flags .Cheap {
@@ -1064,6 +1075,12 @@ func (fs *Goofys) insertInodeFromDirEntry(parent *Inode, entry *DirHandleEntry)
10641075 path := parent .getChildName (* entry .Name )
10651076 inode = NewInode (parent , entry .Name , & path , fs .flags )
10661077 inode .Attributes = entry .Attributes
1078+ if entry .ETag != nil {
1079+ inode .s3Metadata ["etag" ] = []byte (* entry .ETag )
1080+ }
1081+ if entry .StorageClass != nil {
1082+ inode .s3Metadata ["storage-class" ] = []byte (* entry .StorageClass )
1083+ }
10671084 // these are fake dir entries, we will realize the refcnt when
10681085 // lookup is done
10691086 inode .refcnt = 0
0 commit comments