diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-09-29 02:33:10 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-09-29 06:11:47 +0900 |
| commit | 46cd3a28c83e93b5d66c52d06a8366c11910d5c0 (patch) | |
| tree | 6e25c5078b5cd9de78b7a6c9b253f1132358812b /internal/app/paths.go | |
| parent | ad1bc6794f0053c3e63eab408a0d530d53e8b51c (diff) | |
container: remove global msg
This frees all container instances of side effects.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/app/paths.go')
| -rw-r--r-- | internal/app/paths.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/internal/app/paths.go b/internal/app/paths.go index 3316a22e..442317cc 100644 --- a/internal/app/paths.go +++ b/internal/app/paths.go @@ -8,10 +8,10 @@ import ( ) // CopyPaths populates a [hst.Paths] struct. -func CopyPaths(v *hst.Paths, userid int) { copyPaths(direct{}, v, userid) } +func CopyPaths(msg container.Msg, v *hst.Paths, userid int) { copyPaths(direct{}, msg, v, userid) } // copyPaths populates a [hst.Paths] struct. -func copyPaths(k syscallDispatcher, v *hst.Paths, userid int) { +func copyPaths(k syscallDispatcher, msg container.Msg, v *hst.Paths, userid int) { const xdgRuntimeDir = "XDG_RUNTIME_DIR" if tempDir, err := container.NewAbs(k.tempdir()); err != nil { @@ -21,7 +21,7 @@ func copyPaths(k syscallDispatcher, v *hst.Paths, userid int) { } v.SharePath = v.TempDir.Append("hakurei." + strconv.Itoa(userid)) - k.verbosef("process share directory at %q", v.SharePath) + msg.Verbosef("process share directory at %q", v.SharePath) r, _ := k.lookupEnv(xdgRuntimeDir) if a, err := container.NewAbs(r); err != nil { @@ -32,5 +32,5 @@ func copyPaths(k syscallDispatcher, v *hst.Paths, userid int) { v.RuntimePath = a v.RunDirPath = v.RuntimePath.Append("hakurei") } - k.verbosef("runtime directory at %q", v.RunDirPath) + msg.Verbosef("runtime directory at %q", v.RunDirPath) } |
