From dc311a2085c8d18484018ef17384c2492641af17 Mon Sep 17 00:00:00 2001 From: chrislu Date: Tue, 27 Dec 2022 15:00:23 -0800 Subject: [PATCH] minor fix on writer --- weed/shell/command_fs_verify.go | 2 +- weed/shell/command_volume_fsck.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/weed/shell/command_fs_verify.go b/weed/shell/command_fs_verify.go index 11cc64d78..07f3fd9c1 100644 --- a/weed/shell/command_fs_verify.go +++ b/weed/shell/command_fs_verify.go @@ -117,7 +117,7 @@ type ItemEntry struct { func (c *commandFsVerify) verifyTraverseBfs(path string) (fileCount int64, errCount int64, err error) { timeNowAtSec := time.Now().Unix() - return fileCount, errCount, doTraverseBfsAndSaving(c.env, nil, path, false, + return fileCount, errCount, doTraverseBfsAndSaving(c.env, c.writer, path, false, func(entry *filer_pb.FullEntry, outputChan chan interface{}) (err error) { if c.modifyTimeAgoAtSec > 0 { if entry.Entry.Attributes != nil && c.modifyTimeAgoAtSec < timeNowAtSec-entry.Entry.Attributes.Mtime { diff --git a/weed/shell/command_volume_fsck.go b/weed/shell/command_volume_fsck.go index 559b11cd3..be9bd2db2 100644 --- a/weed/shell/command_volume_fsck.go +++ b/weed/shell/command_volume_fsck.go @@ -211,7 +211,7 @@ func (c *commandVolumeFsck) collectFilerFileIdAndPaths(dataNodeVolumeIdToVInfo m } }() - return doTraverseBfsAndSaving(c.env, nil, c.getCollectFilerFilePath(), false, + return doTraverseBfsAndSaving(c.env, c.writer, c.getCollectFilerFilePath(), false, func(entry *filer_pb.FullEntry, outputChan chan interface{}) (err error) { if *c.verbose && entry.Entry.IsDirectory { fmt.Fprintf(c.writer, "checking directory %s\n", util.NewFullPath(entry.Dir, entry.Entry.Name))