mirror of
https://github.com/rclone/rclone.git
synced 2024-11-25 17:57:44 +08:00
431524445e
Before this change, operations.DirMove would fail when moving a directory, if the src and dest were on different upstreams of a combine remote. The issue only affected operations.DirMove, and not sync.MoveDir, because they checked for server-side-move support in different ways. MoveDir checks by just trying it and seeing what error comes back. This works fine for combine because combine returns fs.ErrorCantDirMove which MoveDir understands what to do with. DirMove, however, only checked whether the function pointer is nil. This is an unreliable way to check for combine, because combine does advertise support for DirMove, despite not always being able to do it. This change fixes the issue by checking the returned error in a manner similar to sync.MoveDir and falling back to individual file moves (copy + delete) depending on which error was returned. |
||
---|---|---|
.. | ||
operationsflags | ||
check_test.go | ||
check.go | ||
copy_test.go | ||
copy.go | ||
dedupe_test.go | ||
dedupe.go | ||
listdirsorted_test.go | ||
logger.go | ||
lsjson_test.go | ||
lsjson.go | ||
multithread_test.go | ||
multithread.go | ||
operations_internal_test.go | ||
operations_test.go | ||
operations.go | ||
rc_test.go | ||
rc.go | ||
reopen_test.go | ||
reopen.go |