mirror of
https://github.com/rclone/rclone.git
synced 2025-12-06 00:03:32 +00:00
vfs: Fix TestWriteFileDoubleClose with --vfs-cache-mode >= writes
This was causing the file to be closed on Flush() instead of Release() when the file was opened with O_TRUNC.
This commit is contained in:
@@ -350,7 +350,8 @@ func TestRWFileHandleWriteAt(t *testing.T) {
|
||||
// Preconditions
|
||||
assert.Equal(t, int64(0), offset())
|
||||
assert.True(t, fh.opened)
|
||||
assert.True(t, fh.writeCalled)
|
||||
assert.False(t, fh.writeCalled)
|
||||
assert.True(t, fh.changed)
|
||||
|
||||
// Write the data
|
||||
n, err := fh.WriteAt([]byte("hello**"), 0)
|
||||
|
||||
Reference in New Issue
Block a user