From 6f719bc3c19d56279d2d76d3bcf8fb66ace2d2fb Mon Sep 17 00:00:00 2001 From: Ophestra Date: Tue, 2 Sep 2025 04:54:34 +0900 Subject: system: update doc commands and remove mutex The mutex is not really doing anything, none of these methods make sense when called concurrently anyway. The copylocks analysis is still satisfied by the noCopy struct. Signed-off-by: Ophestra --- internal/app/seal.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'internal/app/seal.go') diff --git a/internal/app/seal.go b/internal/app/seal.go index ec42dc2d..047c3a74 100644 --- a/internal/app/seal.go +++ b/internal/app/seal.go @@ -146,8 +146,11 @@ type hsuUser struct { } func (seal *Outcome) finalise(ctx context.Context, sys sys.State, config *hst.Config) error { + if ctx == nil { + panic("invalid call to finalise") + } if seal.ctx != nil { - panic("finalise called twice") + panic("attempting to finalise twice") } seal.ctx = ctx @@ -306,7 +309,7 @@ func (seal *Outcome) finalise(ctx context.Context, sys sys.State, config *hst.Co share := &shareHost{seal: seal, sc: sys.Paths()} seal.runDirPath = share.sc.RunDirPath - seal.sys = system.New(seal.user.uid.unwrap()) + seal.sys = system.New(seal.ctx, seal.user.uid.unwrap()) seal.sys.Ensure(share.sc.SharePath.String(), 0711) { -- cgit v1.3.1