bunpen: refactor: dbus: use path::abs in place of strings::hasprefix
This commit is contained in:
@@ -165,9 +165,8 @@ fn parse_dbus_address(address: (str | void)) (path::buffer | path::error) = {
|
|||||||
return path::not_prefix;
|
return path::not_prefix;
|
||||||
};
|
};
|
||||||
value = strings::sub(value, len(expected_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
|
// expect the dbus bus address to be an absolute path
|
||||||
// TODO: consider parsing this as an actual path?
|
|
||||||
return path::not_prefix;
|
return path::not_prefix;
|
||||||
};
|
};
|
||||||
yield path::init(value);
|
yield path::init(value);
|
||||||
|
Reference in New Issue
Block a user