From 3c97933416fb67ec577986625a56a2fdac7aef3f Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Fri, 28 Dec 2018 09:53:53 +0000 Subject: [PATCH] oauthutil: suppress ERROR message when doing remote config Before this change doing a remote config using rclone authorize gave this error. The token is saved a bit later anyway so the error is needlessly confusing. ERROR : Failed to save new token in config file: section 'remote' not found. This commit suppresses that error. https://forum.rclone.org/t/onedrive-for-business-failed-to-save-token/8061 --- lib/oauthutil/oauthutil.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/oauthutil/oauthutil.go b/lib/oauthutil/oauthutil.go index 777297b82..6f0fb8519 100644 --- a/lib/oauthutil/oauthutil.go +++ b/lib/oauthutil/oauthutil.go @@ -358,7 +358,7 @@ func doConfig(id, name string, m configmap.Mapper, errorHandler func(*http.Reque if err != nil { return err } - return PutToken(name, m, token, false) + return PutToken(name, m, token, true) } case TitleBarRedirectURL: useWebServer = automatic