Skip to content

Commit 6913ee3

Browse files
committed
Build fix
Signed-off-by: Darby Johnston <[email protected]>
1 parent b018a48 commit 6913ee3

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/opentimelineio/fileUtils.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
#include <filesystem>
88
#include <iostream>
99

10-
#if !defined(_WINDOWS)
10+
#if !defined(_WIN32)
1111
#include <stdlib.h>
1212
#include <unistd.h>
13-
#endif // _WINDOWS
13+
#endif // _WIN32
1414

1515
namespace opentimelineio { namespace OPENTIMELINEIO_VERSION {
1616

@@ -25,17 +25,17 @@ to_unix_separators(std::string const& path)
2525
std::string create_temp_dir()
2626
{
2727
std::string out;
28-
#if defined(_WINDOWS)
28+
#if defined(_WIN32)
2929
// \todo Replace std::tmpnam() since it is potentially unsafe.
3030
out = std::tmpnam(nullptr);
3131
std::filesystem::create_directory(out);
32-
#else // _WINDOWS
33-
std::string dir = std::filesystem::temp_directory_path() / "XXXXXX";
32+
#else // _WIN32
33+
std::string dir = (std::filesystem::temp_directory_path() / "XXXXXX").u8string();
3434
if (mkdtemp(dir.data()))
3535
{
3636
out = dir;
3737
}
38-
#endif // _WINDOWS
38+
#endif // _WIN32
3939
return out;
4040
}
4141

0 commit comments

Comments
 (0)