Summary: These were using `boost::filesystem::path.native()` in contexts where an `std::string` was the expected output. `boost::filesystem::path.native()` returns a `std::wstring` on Windows, so use `.string()` instead.
Reviewed By: simpkins
Differential Revision:
D5305649
fbshipit-source-id:
3c7cd53d2f33d2dbb222731655cdab69d1c4a187
- auto ret = folly::readFile(tmpFile.path().native().c_str(), data);
+ auto ret = folly::readFile(tmpFile.path().string().c_str(), data);
ASSERT_TRUE(ret);
std::string expected =
ASSERT_TRUE(ret);
std::string expected =
// Read the log file and confirm it contains all of the expected messages
std::string data;
// Read the log file and confirm it contains all of the expected messages
std::string data;
- auto ret = folly::readFile(tmpFile.path().native().c_str(), data);
+ auto ret = folly::readFile(tmpFile.path().string().c_str(), data);
ASSERT_TRUE(ret);
std::string expected =
ASSERT_TRUE(ret);
std::string expected =
TEST(ImmediateFileWriter, immediateRead) {
TemporaryFile tmpFile{"logging_test"};
TEST(ImmediateFileWriter, immediateRead) {
TemporaryFile tmpFile{"logging_test"};
- ImmediateFileWriter writer{tmpFile.path().native()};
+ ImmediateFileWriter writer{tmpFile.path().string()};
// Write several messages, and read each one back immediately
// after we write it.
// Write several messages, and read each one back immediately
// after we write it.
- folly::File readf{tmpFile.path().native()};
+ folly::File readf{tmpFile.path().string()};
for (int n = 0; n < 10; ++n) {
writer.writeMessage(folly::to<std::string>("message ", n, "\n"));
for (int n = 0; n < 10; ++n) {
writer.writeMessage(folly::to<std::string>("message ", n, "\n"));