From db33d30722844457a675db2b5820da53a36b9dff Mon Sep 17 00:00:00 2001 From: Christopher Dykes Date: Thu, 4 Aug 2016 15:38:00 -0700 Subject: [PATCH] Don't assume boost::path contains narrow characters Summary: Because it contains `wchar_t`'s on Windows. Reviewed By: yfeldblum Differential Revision: D3672098 fbshipit-source-id: b49db642dedf48bf7379cf339130c93f52a22f9a --- folly/test/FileUtilTest.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/folly/test/FileUtilTest.cpp b/folly/test/FileUtilTest.cpp index 9170ff45..6a63b33c 100644 --- a/folly/test/FileUtilTest.cpp +++ b/folly/test/FileUtilTest.cpp @@ -267,8 +267,8 @@ TEST_F(FileUtilTest, preadv) { TEST(String, readFile) { const TemporaryFile afileTemp, emptyFileTemp; - auto afile = afileTemp.path(); - auto emptyFile = emptyFileTemp.path(); + auto afile = afileTemp.path().string(); + auto emptyFile = emptyFileTemp.path().string(); EXPECT_TRUE(writeFile(string(), emptyFile.c_str())); EXPECT_TRUE(writeFile(StringPiece("bar"), afile.c_str())); @@ -300,7 +300,7 @@ TEST(String, readFile) { class ReadFileFd : public ::testing::Test { protected: void SetUp() override { - ASSERT_TRUE(writeFile(StringPiece("bar"), aFile.path().c_str())); + ASSERT_TRUE(writeFile(StringPiece("bar"), aFile.path().string().c_str())); } TemporaryFile aFile; -- 2.34.1