boost::filesystem::unique_path returns empty string on android

654 views Asked by At

On android, this:

std::string path = boost::filesystem::unique_path().string();

returns the empty string. No exception or other error condition that I can detect. Specifically this is a Nexus 4 running Android 4.4.2. Any idea what's up here?

1

There are 1 answers

0
Christian On

We had the same issue. There is something wrong in the conversion function when returning a wstring to construct a path object. Our workaround for now is to use boost::nowide to return a std::string in unique_path.cpp.