diff options
Diffstat (limited to 'client/main.cpp')
-rw-r--r-- | client/main.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/client/main.cpp b/client/main.cpp index a225a53..8d01af3 100644 --- a/client/main.cpp +++ b/client/main.cpp @@ -58,7 +58,12 @@ static std::string GetLogFilePath() { SystemErrorCodeToString(GetLastError()).c_str()); } - return narrow(temp_path) + log_name; + std::string temp_path_utf8; + if (!android::base::WideToUTF8(temp_path, &temp_path_utf8)) { + fatal_errno("cannot convert temporary file path from UTF-16 to UTF-8"); + } + + return temp_path_utf8 + log_name; } #else static const char kNullFileName[] = "/dev/null"; |