Prevent operations on a file once it's closed

This commit is contained in:
2024-04-14 11:46:43 -07:00
parent 02532437ea
commit e6b36494e7
3 changed files with 20 additions and 1 deletions

View File

@@ -61,6 +61,8 @@ func syscallErr(err error) syscall.Errno {
return syscall.EINVAL
case fsproto.ErrNoRemoveRoot: // refusing to remove root directory
return syscall.EPERM
case fsproto.ErrFileClosed: // cannot perform operation on closed file
return syscall.EBADF
default:
return syscall.EINVAL
}