Browse Source

处理hash

master
xyiege 5 months ago
parent
commit
1bd102f4de
  1. 6
      scagent/core/JsonRpc.go

6
scagent/core/JsonRpc.go

@ -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()))
}

Loading…
Cancel
Save