mirror of https://github.com/rclone/rclone.git
Fix differences print out on check
This commit is contained in:
parent
7153b05342
commit
754c54b64f
|
@ -106,10 +106,17 @@ func (s *StatsInfo) Errors(errors int64) {
|
||||||
s.errors += errors
|
s.errors += errors
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GetErrors reads the number of errors
|
||||||
|
func (s *StatsInfo) GetErrors() int64 {
|
||||||
|
s.lock.RLock()
|
||||||
|
defer s.lock.RUnlock()
|
||||||
|
return s.errors
|
||||||
|
}
|
||||||
|
|
||||||
// Errored returns whether there have been any errors
|
// Errored returns whether there have been any errors
|
||||||
func (s *StatsInfo) Errored() bool {
|
func (s *StatsInfo) Errored() bool {
|
||||||
s.lock.Lock()
|
s.lock.RLock()
|
||||||
defer s.lock.Unlock()
|
defer s.lock.RUnlock()
|
||||||
return s.errors != 0
|
return s.errors != 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -300,7 +300,7 @@ func Check(fdst, fsrc fs.Fs) {
|
||||||
|
|
||||||
log.Printf("Waiting for checks to finish")
|
log.Printf("Waiting for checks to finish")
|
||||||
checkerWg.Wait()
|
checkerWg.Wait()
|
||||||
log.Printf("%d differences found", fs.Stats.Errors)
|
log.Printf("%d differences found", fs.Stats.GetErrors())
|
||||||
}
|
}
|
||||||
|
|
||||||
// List the Fs to stdout
|
// List the Fs to stdout
|
||||||
|
|
Loading…
Reference in New Issue