forked from security/hakurei
internal/app: filter ops in implementation
This is cleaner and less error-prone, and should also result in negligibly less memory allocation. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -18,6 +18,10 @@ type spWaylandOp struct {
|
||||
}
|
||||
|
||||
func (s *spWaylandOp) toSystem(state *outcomeStateSys) error {
|
||||
if state.config.Enablements.Unwrap()&hst.EWayland == 0 {
|
||||
return errNotEnabled
|
||||
}
|
||||
|
||||
// outer wayland socket (usually `/run/user/%d/wayland-%d`)
|
||||
var socketPath *check.Absolute
|
||||
if name, ok := state.k.lookupEnv(wayland.WaylandDisplay); !ok {
|
||||
|
||||
Reference in New Issue
Block a user