mirror of
https://github.com/rclone/rclone.git
synced 2025-12-06 00:03:32 +00:00
vfs: [bugfix] Implement Name() method in WriteFileHandle and ReadFileHandle
Name() method was originally left out and defaulted to the base class which always returns empty. This trigerred incorrect behavior in serve nfs where it relied on the Name() of the interafce to figure out what file it was modifying. This method is copied from RWFileHandle struct. Added extra assert in the tests.
This commit is contained in:
committed by
Nick Craig-Wood
parent
3337fe31c7
commit
23f8dea182
@@ -346,6 +346,9 @@ func TestRWFileHandleWriteAt(t *testing.T) {
|
||||
return n
|
||||
}
|
||||
|
||||
// Name
|
||||
assert.Equal(t, "file1", fh.Name())
|
||||
|
||||
// Preconditions
|
||||
assert.Equal(t, int64(0), offset())
|
||||
assert.True(t, fh.opened)
|
||||
|
||||
Reference in New Issue
Block a user