Skip to content
This repository has been archived by the owner on Mar 29, 2023. It is now read-only.

Commit

Permalink
only count size for regular files
Browse files Browse the repository at this point in the history
Otherwise, we incorrectly draw progress bars.

fixes #24
  • Loading branch information
Stebalien committed Jul 26, 2018
1 parent d398783 commit 964db8d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion 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

0 comments on commit 964db8d

Please sign in to comment.