mirror of
https://github.com/rclone/rclone.git
synced 2026-01-06 02:23:24 +00:00
accounting: fix global error acounting
fs.CountError is called when an error is encountered. The method was calling GlobalStats().Error(err) which incremented the error at the global stats level. This led to calls to core/stats with group= filter returning an error count of 0 even if errors actually occured. This change requires the context to be provided when calling fs.CountError. Doing so, we can retrieve the correct StatsInfo to increment the errors from. Fixes #5865
This commit is contained in:
committed by
Nick Craig-Wood
parent
c053429b9c
commit
8a6fc8535d
@@ -41,7 +41,7 @@ var (
|
||||
//
|
||||
// This is a function pointer to decouple the config
|
||||
// implementation from the fs
|
||||
CountError = func(err error) error { return err }
|
||||
CountError = func(ctx context.Context, err error) error { return err }
|
||||
|
||||
// ConfigProvider is the config key used for provider options
|
||||
ConfigProvider = "provider"
|
||||
|
||||
Reference in New Issue
Block a user