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

vfs: add EPERM to errors

This commit is contained in:
Nick Craig-Wood
2017-10-31 15:33:08 +00:00
parent 190367d917
commit 8184ec4b70
5 changed files with 9 additions and 4 deletions

View File

@@ -311,7 +311,7 @@ func (d *Dir) Open(flags int) (fd Handle, err error) {
rdwrMode := flags & (os.O_RDONLY | os.O_WRONLY | os.O_RDWR)
if rdwrMode != os.O_RDONLY {
fs.Errorf(d, "Can only open directories read only")
return nil, os.ErrPermission
return nil, EPERM
}
return newDirHandle(d), nil
}