Skip to content

Commit 551999b

Browse files
Maybe resolves #84
1 parent d46aecc commit 551999b

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/platform/windows/misc.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1848,7 +1848,7 @@ namespace platf {
18481848
}
18491849

18501850
// Get the output size required to store the string
1851-
auto output_size = MultiByteToWideChar(CP_UTF8, MB_ERR_INVALID_CHARS, string.data(), string.size(), nullptr, 0);
1851+
auto output_size = MultiByteToWideChar(CP_UTF8, 0, string.data(), string.size(), nullptr, 0);
18521852
if (output_size == 0) {
18531853
auto winerr = GetLastError();
18541854
BOOST_LOG(error) << "Failed to get UTF-16 buffer size: "sv << winerr;
@@ -1857,7 +1857,7 @@ namespace platf {
18571857

18581858
// Perform the conversion
18591859
std::wstring output(output_size, L'\0');
1860-
output_size = MultiByteToWideChar(CP_UTF8, MB_ERR_INVALID_CHARS, string.data(), string.size(), output.data(), output.size());
1860+
output_size = MultiByteToWideChar(CP_UTF8, 0, string.data(), string.size(), output.data(), output.size());
18611861
if (output_size == 0) {
18621862
auto winerr = GetLastError();
18631863
BOOST_LOG(error) << "Failed to convert string to UTF-16: "sv << winerr;

src/process.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -966,6 +966,7 @@ namespace proc {
966966
// when it contains spaces. Unlike POSIX, Windows forbids quotes in paths,
967967
// so we can safely strip them all out here to avoid confusing the user.
968968
boost::erase_all(ctx.working_dir, "\"");
969+
ctx.working_dir += '\\';
969970
#endif
970971
}
971972

0 commit comments

Comments
 (0)