1
0
mirror of https://github.com/rclone/rclone.git synced 2025-12-06 00:03:32 +00:00

rcat: preserve metadata when Copy falls back to Rcat

Before this change if we copied files of unknown size, then they lost
their metadata.

This was particularly noticeable using --s3-decompress.

This change adds metadata to Rcat and RcatSized and changes Copy to
pass the metadata in when it calls Rcat for an unknown sized input.

Fixes #6546
This commit is contained in:
Nick Craig-Wood
2022-11-08 17:42:18 +00:00
parent ec2024b907
commit 617c5d5e1b
8 changed files with 151 additions and 20 deletions

View File

@@ -759,7 +759,7 @@ func testFutureProof(t *testing.T, f *Fs) {
// Rcat must fail
in := io.NopCloser(bytes.NewBufferString("abc"))
robj, err := operations.Rcat(ctx, f, file, in, modTime)
robj, err := operations.Rcat(ctx, f, file, in, modTime, nil)
assert.Nil(t, robj)
assert.NotNil(t, err)
if err != nil {