1
0
Fork 0
mirror of https://github.com/restic/restic.git synced 2024-12-22 15:57:07 +00:00

Use file size from FileInfo

This commit is contained in:
Alexander Neumann 2015-02-03 22:05:25 +01:00
parent bb777d9a58
commit 26d3949c8b

View file

@ -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: