|
|
|
@ -119,15 +119,19 @@ func scanFileUnderPath(rootDir string, scope string, logger *zap.Logger, replay |
|
|
|
|
|
|
|
var fsize string |
|
|
|
fsize = "0kb" |
|
|
|
// hash
|
|
|
|
var hash string |
|
|
|
|
|
|
|
//
|
|
|
|
if file.IsDir() { |
|
|
|
fsize = "0" |
|
|
|
hash = "" |
|
|
|
} else { |
|
|
|
fsize = fmt.Sprintf("%d", fileinfo.Size()) |
|
|
|
hash = util.CalacHash(realpath) |
|
|
|
} |
|
|
|
// 加入到列表
|
|
|
|
hash := util.CalacHash(realpath) |
|
|
|
|
|
|
|
flplist.Flist = append(flplist.Flist, FloopJson{Path: file.Name(), Size: fsize, Hash: hash}) |
|
|
|
// allFiles = append(allFiles, filepath.Join(rootDir, file.Name()))
|
|
|
|
} |
|
|
|
|