diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-11-02 12:22:32 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-11-02 12:22:32 +0900 |
| commit | f33aea9ff9c5eb678c6f1de59132aab69a59757e (patch) | |
| tree | c59e2a93a3f8829146f18ad3079bc182f30d44c6 /internal/outcome/outcome.go | |
| parent | e7fc311d0b880e7ae44b97d406a309604b01dbac (diff) | |
internal/env: cleaner runtime dir fallback
This now places rundir inside the fallback runtime dir, so special case in internal/outcome is avoided.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/outcome/outcome.go')
| -rw-r--r-- | internal/outcome/outcome.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/internal/outcome/outcome.go b/internal/outcome/outcome.go index 2397b725..9cf426f6 100644 --- a/internal/outcome/outcome.go +++ b/internal/outcome/outcome.go @@ -196,10 +196,10 @@ func (state *outcomeStateSys) ensureRuntimeDir() { return } state.useRuntimeDir = true - state.sys.Ensure(state.sc.RunDirPath, 0700) - state.sys.UpdatePermType(system.User, state.sc.RunDirPath, acl.Execute) - state.sys.Ensure(state.sc.RuntimePath, 0700) // ensure this dir in case XDG_RUNTIME_DIR is unset - state.sys.UpdatePermType(system.User, state.sc.RuntimePath, acl.Execute) + state.sys. + // ensure this dir in case XDG_RUNTIME_DIR is unset + Ensure(state.sc.RuntimePath, 0700).UpdatePermType(system.User, state.sc.RuntimePath, acl.Execute). + Ensure(state.sc.RunDirPath, 0700).UpdatePermType(system.User, state.sc.RunDirPath, acl.Execute) } // instance returns the pathname to a process-specific directory within TMPDIR. |
