replace boost filesystem with std filesystem; upgrade gtest and find it using cmake.
This commit is contained in:
+3
-2
@@ -191,7 +191,8 @@ FormPartPtr FormPart::New(const std::string& name, std::string&& data,
|
||||
return form_part;
|
||||
}
|
||||
|
||||
FormPartPtr FormPart::NewFile(const std::string& name, const Path& path,
|
||||
FormPartPtr FormPart::NewFile(const std::string& name,
|
||||
const std::filesystem::path& path,
|
||||
const std::string& media_type) {
|
||||
auto form_part = std::make_shared<FormPart>();
|
||||
|
||||
@@ -201,7 +202,7 @@ FormPartPtr FormPart::NewFile(const std::string& name, const Path& path,
|
||||
|
||||
// Determine file name from file path.
|
||||
// TODO: encoding
|
||||
form_part->file_name_ = path.filename().string(std::codecvt_utf8<wchar_t>());
|
||||
form_part->file_name_ = path.filename().string();
|
||||
|
||||
// Determine media type from file extension.
|
||||
// TODO: Default to "application/text"?
|
||||
|
||||
Reference in New Issue
Block a user