Adds platform.File.Chown (#1422)

Signed-off-by: Adrian Cole <adrian@tetrate.io>
This commit is contained in:
Crypt Keeper
2023-05-01 18:32:13 +08:00
committed by GitHub
parent 493fe2d410
commit 1047ddee78
6 changed files with 67 additions and 35 deletions

View File

@@ -543,7 +543,7 @@ func (jsfsFchown) invoke(ctx context.Context, mod api.Module, args ...interface{
if f, ok := fsc.LookupFile(fd); !ok {
errno = syscall.EBADF
} else {
errno = platform.ChownFile(f.File.File(), int(uid), int(gid))
errno = f.File.Chown(int(uid), int(gid))
}
return jsfsInvoke(ctx, mod, callback, errno)