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:
@@ -85,7 +85,7 @@ func TestDownloaders(t *testing.T) {
|
||||
|
||||
// Write the test file
|
||||
in := io.NopCloser(readers.NewPatternReader(size))
|
||||
src, err := operations.RcatSize(ctx, r.Fremote, remote, in, size, time.Now())
|
||||
src, err := operations.RcatSize(ctx, r.Fremote, remote, in, size, time.Now(), nil)
|
||||
require.NoError(t, err)
|
||||
assert.Equal(t, size, src.Size())
|
||||
|
||||
|
||||
Reference in New Issue
Block a user