Skip to content

Commit 72ebc36

Browse files
author
simpleqin
committed
refine code of Check
1 parent 829d079 commit 72ebc36

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

pkg/meta/base.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2118,15 +2118,14 @@ func (m *baseMeta) Check(ctx Context, fpath string, repair bool, recursive bool,
21182118
logger.Errorf("dolist %s: %s", path, st)
21192119
return
21202120
}
2121-
var ss []Slice
2121+
ss := make([]Slice, 0, len(rawSlices))
21222122
for _, rs := range rawSlices {
2123-
fmt.Println(rs)
21242123
if rs.id > 0 {
21252124
ss = append(ss, Slice{Id: rs.id, Size: rs.size})
21262125
}
21272126
}
21282127
lock.Lock()
2129-
slices[inode] = append(slices[inode], ss...)
2128+
slices[inode] = ss
21302129
if showProgress != nil {
21312130
showProgress(len(slices[inode]))
21322131
}

0 commit comments

Comments
 (0)