aboutsummaryrefslogtreecommitdiff
path: root/weed/filer/filechunks.go
diff options
context:
space:
mode:
Diffstat (limited to 'weed/filer/filechunks.go')
-rw-r--r--weed/filer/filechunks.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/weed/filer/filechunks.go b/weed/filer/filechunks.go
index 68f308a51..542754e3b 100644
--- a/weed/filer/filechunks.go
+++ b/weed/filer/filechunks.go
@@ -23,6 +23,10 @@ func TotalSize(chunks []*filer_pb.FileChunk) (size uint64) {
return
}
+func FileSize2(entry *Entry) (size uint64) {
+ return maxUint64(TotalSize(entry.Chunks), entry.Attr.FileSize)
+}
+
func FileSize(entry *filer_pb.Entry) (size uint64) {
return maxUint64(TotalSize(entry.Chunks), entry.Attributes.FileSize)
}