bunpen: refactor: dbus: use path::abs in place of strings::hasprefix

This commit is contained in:
2025-01-05 06:39:06 +00:00
parent 2f717dc770
commit b4ff9eb4ae

View File

@@ -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);