mirror of
https://github.com/octoleo/restic.git
synced 2024-11-26 14:56:29 +00:00
Use file size from FileInfo
This commit is contained in:
parent
bb777d9a58
commit
26d3949c8b
1
node.go
1
node.go
@ -66,6 +66,7 @@ func NodeFromFileInfo(path string, fi os.FileInfo) (*Node, error) {
|
|||||||
switch fi.Mode() & (os.ModeType | os.ModeCharDevice) {
|
switch fi.Mode() & (os.ModeType | os.ModeCharDevice) {
|
||||||
case 0:
|
case 0:
|
||||||
node.Type = "file"
|
node.Type = "file"
|
||||||
|
node.Size = uint64(fi.Size())
|
||||||
case os.ModeDir:
|
case os.ModeDir:
|
||||||
node.Type = "dir"
|
node.Type = "dir"
|
||||||
case os.ModeSymlink:
|
case os.ModeSymlink:
|
||||||
|
Loading…
Reference in New Issue
Block a user