In a typical rclone copy to a bucket/container based remote, before
this change we were doing a list, followed by a HEAD of the bucket to
check it existed before doing the copy. The fact the list succeeded
means the bucket exists so mark it OK at that point.
Issue #1421
Before this fix we were doing the token refresh but ignoring the new
tokens.
This bug was introduced in v1.39 by 4c0e2f9b3b17cd403744b2f19f7853ee016d9ae3
Fixes#2018Fixes#2031
The purpose of this is to make it easier to maintain and eventually to
allow the rclone backends to be re-used in other projects without
having to use the rclone configuration system.
The new code layout is documented in CONTRIBUTING.