File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed
Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -70,19 +70,16 @@ fs::path create_directory(std::string_view prefix) {
7070 " prefix cannot contain a directory separator" );
7171 }
7272
73- #ifdef _WIN32
74- fs::path::string_type path = make_path (prefix);
75- #else
76- std::string path = fs::temp_directory_path () / prefix;
77- path += prefix.empty () ? " XXXXXX" : " .XXXXXX" ;
78- #endif
79-
8073 std::error_code ec;
8174#ifdef _WIN32
75+ fs::path path = make_path (prefix);
8276 if (!CreateDirectory (path.c_str (), nullptr )) {
8377 ec = std::error_code (GetLastError (), std::system_category ());
8478 }
8579#else
80+ std::string path = fs::temp_directory_path () / prefix;
81+ path += prefix.empty () ? " XXXXXX" : " .XXXXXX" ;
82+
8683 if (mkdtemp (path.data ()) == nullptr ) {
8784 ec = std::error_code (errno, std::system_category ());
8885 }
You can’t perform that action at this time.
0 commit comments