forked from security/hakurei
container: use absolute for pathname
This is simultaneously more efficient and less error-prone. This change caused minor API changes in multiple other packages. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
10
hst/paths.go
10
hst/paths.go
@@ -1,11 +1,15 @@
|
||||
package hst
|
||||
|
||||
import "hakurei.app/container"
|
||||
|
||||
// Paths contains environment-dependent paths used by hakurei.
|
||||
type Paths struct {
|
||||
// temporary directory returned by [os.TempDir] (usually `/tmp`)
|
||||
TempDir *container.Absolute `json:"temp_dir"`
|
||||
// path to shared directory (usually `/tmp/hakurei.%d`)
|
||||
SharePath string `json:"share_path"`
|
||||
SharePath *container.Absolute `json:"share_path"`
|
||||
// XDG_RUNTIME_DIR value (usually `/run/user/%d`)
|
||||
RuntimePath string `json:"runtime_path"`
|
||||
RuntimePath *container.Absolute `json:"runtime_path"`
|
||||
// application runtime directory (usually `/run/user/%d/hakurei`)
|
||||
RunDirPath string `json:"run_dir_path"`
|
||||
RunDirPath *container.Absolute `json:"run_dir_path"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user