File tree Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change 117117
1181186 . Alternative to steps 4. and 5. -
119119
120- powershell -ExecutionPolicy ByPass -File build.ps1 -toolset 141
120+ powershell -ExecutionPolicy ByPass -File build.ps1 -toolset 142
121121
122122 The build script builds executables and installation media for all
123123 platforms (x86 and x64 / Debug and Release with debug symbols)
Original file line number Diff line number Diff line change @@ -362,15 +362,19 @@ string File::tempFileName()
362362#ifdef _WIN32
363363 // requires TMP environment variable to be set
364364 wchar_t *fileName = _wtempnam (nullptr , nullptr ); // TODO: static buffer, not thread-safe
365- if ( !fileName )
365+ if ( !fileName)
366366 THROW (" Failed to create a temporary file name." );
367+ string path = decodeName (fileName);
368+ free (fileName);
369+ #else
370+ #ifdef __APPLE__
371+ string path = env (" TMPDIR" ) + " /XXXXXX" ;
367372#else
368- char *fileName = strdup (" /tmp/XXXXXX" );
369- if (mkstemp (fileName) == -1 )
373+ string path = " /tmp/XXXXXX" ;
374+ #endif
375+ if (mkstemp (path.data ()) == -1 )
370376 THROW (" Failed to create a temporary file name." );
371377#endif
372- string path = decodeName (fileName);
373- free (fileName);
374378 tempFiles.push (path);
375379 return path;
376380}
You can’t perform that action at this time.
0 commit comments