mirror of
https://github.com/rclone/rclone.git
synced 2025-02-25 04:06:25 +08:00

Before this change backends which supported more than one hash (eg pcloud) or backends which wrapped backends supporting more than one hash (combine) would fail the TestMultithreadCopy and TestMultithreadCopyAbort with an error like Failed to make new multi hasher: requested set 000001ff contains unknown hash types This was caused by the tests limiting the globally available hashes to the first hash supplied by the backend. This was added in this commit d5d28a7513b09701 operations: fix overwrite of destination when multi-thread transfer fails to overcome the tests taking >100s on the local backend because they made every single hash that the local backend. It brought this time down to 20s. This commit fixes the problem and retains the CPU speedup by only applying the fix from the original commit if the destination backend is the local backend. This fixes the common case (testing on the local backend). This does not fix the problem for a backend which wraps the local backend (eg combine) but this is run only on the integration test machine and not on all the CI.