Oh, with ioutil.ReadDir subtracting of 4096 isn't needed.
This commit is contained in:
parent
9a889e746a
commit
114d3cc931
@ -38,6 +38,5 @@ func DirectorySize(path string) (dirSz int64, err error) {
|
|||||||
dirSz += entry.Size()
|
dirSz += entry.Size()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Here we subtract a size of a directory's inode to get size of files only.
|
return dirSz, nil
|
||||||
return dirSz - 4096, nil
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user