From 26d3949c8b6f7cd5cad57a5e1e1bd572cb38e86c Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Tue, 3 Feb 2015 22:05:25 +0100 Subject: [PATCH] Use file size from FileInfo --- node.go | 1 + 1 file changed, 1 insertion(+) diff --git a/node.go b/node.go index f044382f7..ff2d8018e 100644 --- a/node.go +++ b/node.go @@ -66,6 +66,7 @@ func NodeFromFileInfo(path string, fi os.FileInfo) (*Node, error) { switch fi.Mode() & (os.ModeType | os.ModeCharDevice) { case 0: node.Type = "file" + node.Size = uint64(fi.Size()) case os.ModeDir: node.Type = "dir" case os.ModeSymlink: