Add buckets to have same coloring as directories
This commit is contained in:
@@ -42,6 +42,7 @@ import (
|
||||
"encoding/xml"
|
||||
"errors"
|
||||
"fmt"
|
||||
"os"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
@@ -114,6 +115,7 @@ func (c *s3Client) listBucketsInternal() ([]*client.Item, error) {
|
||||
item := new(client.Item)
|
||||
item.Name = b.Name
|
||||
item.Time = b.CreationDate
|
||||
item.FileType = os.ModeDir
|
||||
items = append(items, item)
|
||||
}
|
||||
return items, nil
|
||||
|
||||
@@ -131,6 +131,7 @@ func (c *s3Client) filterItems(startAt, marker, prefix, delimiter string, conten
|
||||
item.Name = strings.TrimPrefix(it.Key, filepath.Clean(prefix)+string(filepath.Separator))
|
||||
item.Time = it.LastModified
|
||||
item.Size = it.Size
|
||||
item.FileType = 0
|
||||
items = append(items, item)
|
||||
nextMarker = it.Key
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user