Add buckets to have same coloring as directories

This commit is contained in:
Harshavardhana
2015-04-23 22:44:05 -07:00
parent 86c5986df3
commit 518fa8a2cf
2 changed files with 3 additions and 0 deletions
+2
View File
@@ -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
+1
View File
@@ -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
}