config/Param: add method GetPath()

Move code from config_parse_path().
This commit is contained in:
Max Kellermann
2016-10-28 11:45:12 +02:00
parent 5b2b4bf13c
commit 7a3415166e
5 changed files with 26 additions and 21 deletions

View File

@@ -68,7 +68,7 @@ listen_add_config_param(unsigned int port,
if (0 == strcmp(param->value.c_str(), "any")) {
return listen_socket->AddPort(port, error_r);
} else if (param->value[0] == '/' || param->value[0] == '~') {
auto path = config_parse_path(param, error_r);
auto path = param->GetPath(error_r);
return !path.IsNull() &&
listen_socket->AddPath(std::move(path), error_r);
} else {