Fix for loop over value array range issue. (#2187)

This commit is contained in:
Mark Wolfe 2016-12-21 09:56:02 +11:00 committed by Cameron Sparr
parent a9f03a72f5
commit d2787e8ef5
1 changed files with 4 additions and 1 deletions

View File

@ -73,7 +73,10 @@ func (s *systemPS) DiskUsage(
var usage []*disk.UsageStat
var partitions []*disk.PartitionStat
for _, p := range parts {
for i := range parts {
p := parts[i]
if len(mountPointFilter) > 0 {
// If the mount point is not a member of the filter set,
// don't gather info on it.