aboutsummaryrefslogtreecommitdiff
path: root/weed/filer/entry.go
diff options
context:
space:
mode:
Diffstat (limited to 'weed/filer/entry.go')
-rw-r--r--weed/filer/entry.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/weed/filer/entry.go b/weed/filer/entry.go
index 8c28c8513..2062401f7 100644
--- a/weed/filer/entry.go
+++ b/weed/filer/entry.go
@@ -46,7 +46,7 @@ type Entry struct {
}
func (entry *Entry) Size() uint64 {
- return maxUint64(maxUint64(TotalSize(entry.Chunks), entry.FileSize), uint64(len(entry.Content)))
+ return maxUint64(maxUint64(TotalSize(entry.GetChunks()), entry.FileSize), uint64(len(entry.Content)))
}
func (entry *Entry) Timestamp() time.Time {
@@ -91,7 +91,7 @@ func (entry *Entry) ToExistingProtoEntry(message *filer_pb.Entry) {
}
message.IsDirectory = entry.IsDirectory()
message.Attributes = EntryAttributeToPb(entry)
- message.Chunks = entry.Chunks
+ message.Chunks = entry.GetChunks()
message.Extended = entry.Extended
message.HardLinkId = entry.HardLinkId
message.HardLinkCounter = entry.HardLinkCounter
@@ -123,6 +123,10 @@ func (entry *Entry) ToProtoFullEntry() *filer_pb.FullEntry {
}
}
+func (entry *Entry) GetChunks() []*filer_pb.FileChunk {
+ return entry.Chunks
+}
+
func FromPbEntry(dir string, entry *filer_pb.Entry) *Entry {
t := &Entry{}
t.FullPath = util.NewFullPath(dir, entry.Name)