Skip to content

Commit

Permalink
PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ddiakiteaneo committed Sep 2, 2024
1 parent bb9b653 commit 66d4359
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ wc+KqiSg9c9iqA==

/**
*
* @param path
* @return
* @param path The path to the file to be read
* @return content of the file as a std::string
*/
std::string read_file(const absl::string_view &path) {
std::ifstream file(path.data(), std::ios::in | std::ios::binary);
Expand All @@ -76,8 +76,10 @@ bool initialize_protocol_endpoint(const common::options::ControlPlane &controlPl
const auto delim = endpoint_view.find("://");
const auto http_delim = endpoint_view.find("http://");
const auto https_delim = endpoint_view.find("https://");
if (endpoint_view.find("unix") == 0) {
if (endpoint_view[0] == '/') {
if ((endpoint_view.find("unix") == 0) ||
(endpoint_view[0] == '/' && endpoint_view.find(':') == absl::string_view::npos)) {
endpoint = {endpoint_view.cbegin(), endpoint_view.cend()};
if (endpoint[0] == '/') {
endpoint.insert(0, "unix://");
} else {
endpoint.insert(0, "unix:");
Expand Down

0 comments on commit 66d4359

Please sign in to comment.