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

vfs: add ECLOSED and tidy errors

This commit is contained in:
Nick Craig-Wood
2017-11-03 11:35:36 +00:00
parent 22ee839d05
commit 2083ac6e2a
10 changed files with 47 additions and 17 deletions

View File

@@ -76,7 +76,7 @@ func TestReadFileHandleMethods(t *testing.T) {
assert.True(t, fh.closed)
// Close again
assert.Equal(t, EBADF, fh.Close())
assert.Equal(t, ECLOSED, fh.Close())
}
func TestReadFileHandleSeek(t *testing.T) {
@@ -177,7 +177,7 @@ func TestReadFileHandleReadAt(t *testing.T) {
// check reading on closed file
fh.noSeek = true
n, err = fh.ReadAt(buf, 100)
assert.Equal(t, EBADF, err)
assert.Equal(t, ECLOSED, err)
}
func TestReadFileHandleFlush(t *testing.T) {