Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/utility/src/helpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ std::string xstudio::utility::uri_to_posix_path(const caf::uri &uri) {
#ifdef _WIN32

static const std::regex drive_letter_with_unwanted_leading_fwd_slash(
R"(^\/[A-Z]\:)", std::regex::optimize);
R"(^\/[A-Za-z]\:)", std::regex::optimize);
std::cmatch m;
if (std::regex_search(path.c_str(), m, drive_letter_with_unwanted_leading_fwd_slash)) {
// Remove the leading /
Expand Down Expand Up @@ -571,7 +571,7 @@ caf::uri xstudio::utility::posix_path_to_uri(const std::string &path, const bool
#endif
}

p = reverse_remap_file_path(path);
p = reverse_remap_file_path(p);


// spdlog::warn("posix_path_to_uri: {} -> {}", path, p);
Expand All @@ -583,7 +583,7 @@ caf::uri xstudio::utility::posix_path_to_uri(const std::string &path, const bool
if (not p.empty() && p[0] != '/')
return caf::uri_builder().scheme("file").path(p).make();

auto result = caf::uri_builder().scheme("file").host("localhost").path(p).make();
auto result = caf::uri_builder().scheme("file").host("").path(p).make();

return result;

Expand Down