mirror of
https://github.com/minio/mc.git
synced 2025-11-13 12:22:45 +03:00
diff: Add scanBar for recursive diff
This commit is contained in:
7
diff.go
7
diff.go
@@ -169,6 +169,10 @@ func diffFolders(firstClnt, secondClnt client.Client, outCh chan<- diffMessage)
|
||||
//
|
||||
// 4: diff(d1..., d2) -> []diff(d1/f, d2/f) -> VALID.
|
||||
func diffFoldersRecursive(firstClnt, secondClnt client.Client, outCh chan<- diffMessage) {
|
||||
var scanBar scanBarFunc
|
||||
if !globalQuietFlag && !globalJSONFlag { // set up progress bar
|
||||
scanBar = scanBarFactory()
|
||||
}
|
||||
recursive := true
|
||||
firstListCh := firstClnt.List(recursive, false) // Copy first list channel.
|
||||
for firstContentCh := range firstListCh {
|
||||
@@ -197,5 +201,8 @@ func diffFoldersRecursive(firstClnt, secondClnt client.Client, outCh chan<- diff
|
||||
outCh <- *diffMsg
|
||||
continue
|
||||
}
|
||||
if !globalQuietFlag && !globalJSONFlag { // set up progress bar
|
||||
scanBar(firstContent.URL.String())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user