From b4ff9eb4ae992fa00b33874287a18a26f298e1a0 Mon Sep 17 00:00:00 2001 From: Colin Date: Sun, 5 Jan 2025 06:39:06 +0000 Subject: [PATCH] bunpen: refactor: dbus: use path::abs in place of strings::hasprefix --- pkgs/by-name/bunpen/restrict/dbus_proxy.ha | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkgs/by-name/bunpen/restrict/dbus_proxy.ha b/pkgs/by-name/bunpen/restrict/dbus_proxy.ha index 7a4306af6..a18153b89 100644 --- a/pkgs/by-name/bunpen/restrict/dbus_proxy.ha +++ b/pkgs/by-name/bunpen/restrict/dbus_proxy.ha @@ -165,9 +165,8 @@ fn parse_dbus_address(address: (str | void)) (path::buffer | path::error) = { return path::not_prefix; }; value = strings::sub(value, len(expected_prefix)); - if (!strings::hasprefix(value, "/")) { + if (!path::abs(value)) { // expect the dbus bus address to be an absolute path - // TODO: consider parsing this as an actual path? return path::not_prefix; }; yield path::init(value);