@@ -23,7 +23,7 @@ type S3API interface {
2323
2424var _ FileSource = & S3Backend {}
2525
26- func (s * S3Backend ) Read (prefix string ) ([]Item , bool , error ) {
26+ func (s * S3Backend ) Read (prefix string ) ([]* Item , bool , error ) {
2727 // Ensure the prefix has a trailing slash for s3 keys
2828 if ! strings .HasSuffix (prefix , "/" ) {
2929 prefix = prefix + "/"
@@ -62,11 +62,11 @@ func (s *S3Backend) Read(prefix string) ([]Item, bool, error) {
6262 log .Infof ("Skipping indexing of %s/%s (found skipindex file %s), will include in parent directory" , s .bucket , prefix , fileName )
6363 // Return empty items but mark as not having noindex file
6464 // This will prevent indexing this directory but still include it in the parent
65- return []Item {}, false , nil
65+ return []* Item {}, false , nil
6666 }
6767 }
6868
69- var items []Item
69+ var items []* Item
7070 // Process all other files
7171 for _ , content := range resp .Contents {
7272 if shouldSkip (* content .Key , s .cfg .IndexFile , s .cfg .Skips ) {
@@ -76,11 +76,12 @@ func (s *S3Backend) Read(prefix string) ([]Item, bool, error) {
7676 // Get the relative name by removing the prefix
7777 itemName := strings .TrimPrefix (* content .Key , prefix )
7878
79- item := Item {
79+ item := & Item {
8080 Name : itemName ,
81- Size : humanizeBytes ( * content .Size ) ,
82- LastModified : content .LastModified . Format ( s . cfg . DateFormat ) ,
81+ Size : * content .Size ,
82+ LastModified : * content .LastModified ,
8383 IsDir : false ,
84+ HasMetadata : true ,
8485 }
8586
8687 items = append (items , item )
@@ -117,7 +118,7 @@ func (s *S3Backend) Read(prefix string) ([]Item, bool, error) {
117118 }
118119
119120 dirName := strings .TrimPrefix (* commonPrefix .Prefix , prefix )
120- item := Item {
121+ item := & Item {
121122 Name : dirName ,
122123 IsDir : true ,
123124 }
0 commit comments