rclone/fs/operations
nielash 431524445e combine: fix operations.DirMove across upstreams - fixes #7661
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.
2024-03-07 11:11:46 +00:00
..
operationsflags sync: report list of synced paths to file -- see #7282 2024-01-20 14:50:08 -05:00
check_test.go operations: skip backends incapable of testing TestApplyTransforms - #7591 2024-02-13 15:07:41 -05:00
check.go vfs: fix unicode normalization on macOS - fixes #7072 2024-03-06 16:12:13 +00:00
copy_test.go operations: fix invalid UTF-8 when truncating file names when not using --inplace 2023-10-29 14:04:37 +00:00
copy.go rc: add srcFs and dstFs to core/stats and core/transferred stats 2024-02-02 11:43:10 +00:00
dedupe_test.go test: replace defer cleanup with t.Cleanup 2022-12-09 14:38:05 +00:00
dedupe.go accounting: Make checkers show what they are doing 2023-03-01 11:10:38 +00:00
listdirsorted_test.go test: replace defer cleanup with t.Cleanup 2022-12-09 14:38:05 +00:00
logger.go sync: report list of synced paths to file -- see #7282 2024-01-20 14:50:08 -05:00
lsjson_test.go lsjson,lsf: make sure metadata appears for directories 2024-02-28 16:26:14 +00:00
lsjson.go lsjson,lsf: make sure metadata appears for directories 2024-02-28 16:26:14 +00:00
multithread_test.go rc: add srcFs and dstFs to core/stats and core/transferred stats 2024-02-02 11:43:10 +00:00
multithread.go operations: use built in io.OffsetWriter for go1.20 2024-01-15 16:22:07 +00:00
operations_internal_test.go fs: deglobalise the config #4685 2020-11-26 16:40:12 +00:00
operations_test.go combine: fix operations.DirMove across upstreams - fixes #7661 2024-03-07 11:11:46 +00:00
operations.go combine: fix operations.DirMove across upstreams - fixes #7661 2024-03-07 11:11:46 +00:00
rc_test.go operations: add operations/hashsum to the rc as rclone hashsum equivalent 2024-02-29 16:21:42 +00:00
rc.go operations: add operations/hashsum to the rc as rclone hashsum equivalent 2024-02-29 16:21:42 +00:00
reopen_test.go operations: make Open() return an io.ReadSeekCloser #7350 2023-11-20 18:07:05 +00:00
reopen.go operations: make Open() return an io.ReadSeekCloser #7350 2023-11-20 18:07:05 +00:00