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

operations: fix setting the timestamp on Windows for multithread copy

Before this fix we attempted to set the modification time on the file
when it was open. This works fine on Linux but not on Windows. The
test was also incorrect testing the source file rather than the
destination file.

This closes the file before setting the modification time and fixes
the tests.

Fixes #3994
This commit is contained in:
Nick Craig-Wood
2020-02-24 10:22:09 +00:00
parent 5470d34740
commit bde0334bd8
2 changed files with 5 additions and 2 deletions

View File

@@ -138,7 +138,7 @@ func TestMultithreadCopy(t *testing.T) {
assert.Equal(t, src.Size(), dst.Size())
assert.Equal(t, "file1", dst.Remote())
fstest.CheckListingWithPrecision(t, r.Fremote, []fstest.Item{file1}, nil, fs.ModTimeNotSupported)
fstest.CheckItems(t, r.Flocal, file1)
require.NoError(t, dst.Remove(context.Background()))
})
}