mirror of
https://github.com/tw93/Mole.git
synced 2026-03-23 23:15:07 +00:00
fix(analyze): count top-level files in json output
This commit is contained in:
@@ -58,6 +58,8 @@ func performScanForJSON(path string) jsonOutput {
|
||||
info, err := item.Info()
|
||||
if err == nil {
|
||||
size = info.Size()
|
||||
atomic.AddInt64(&filesScanned, 1)
|
||||
atomic.AddInt64(&bytesScanned, size)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -74,6 +76,6 @@ func performScanForJSON(path string) jsonOutput {
|
||||
Path: path,
|
||||
Entries: entries,
|
||||
TotalSize: totalSize,
|
||||
TotalFiles: filesScanned,
|
||||
TotalFiles: atomic.LoadInt64(&filesScanned),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user