Fix the conversion from file paths to strings in the remote_file library.
On Windows, the underlying value_type of std::filesystem::path is wchar_t,
so there is no conversion from a path to std::string_view via calls to
c_str(), and there is no implicit conversion to std::string. Instead, we
now explicitly call string() to perform the conversion.
This creates a temporary string, so we can no longer simply store a string view
to it in LocalRemoteFile. So I changed the member type to std::string.
(Keeping a string view as a data member was dangerous anyway, since it created
an undocumented assumption that the path object had to outlive the file handle.)
Fix the conversion from file paths to strings in the remote_file library.
On Windows, the underlying value_type of
std::filesystem::path
iswchar_t
, so there is no conversion from a path tostd::string_view
via calls toc_str()
, and there is no implicit conversion tostd::string
. Instead, we now explicitly callstring()
to perform the conversion.This creates a temporary string, so we can no longer simply store a string view to it in
LocalRemoteFile
. So I changed the member type tostd::string
. (Keeping a string view as a data member was dangerous anyway, since it created an undocumented assumption that the path object had to outlive the file handle.)