Skip to content
This repository has been archived by the owner on Apr 24, 2021. It is now read-only.

only count size for regular files #25

Merged
merged 1 commit into from
Jul 27, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion files/serialfile.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ func (f *serialFile) Size() (int64, error) {
return err
}

if fi != nil && fi.Mode()&(os.ModeSymlink|os.ModeNamedPipe) == 0 {
if fi != nil && fi.Mode().IsRegular() {
du += fi.Size()
}
return nil
Expand Down