File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
src/aws-cpp-sdk-core/source/platform/windows Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -218,7 +218,7 @@ bool CreateDirectoryIfNotExists(const char* path, bool createParentDirs)
218218 for (size_t i = createParentDirs ? 0 : directoryName.size () - 1 ; i < directoryName.size (); i++)
219219 {
220220 // Create the intermediate directory if we find a delimiter and the delimiter is not the first char, or if this is the target directory.
221- if (i != 0 && (directoryName[i] == FileSystem::PATH_DELIM || i == directoryName.size () - 1 ))
221+ if (i > 2 && (directoryName[i] == FileSystem::PATH_DELIM || i == directoryName.size () - 1 ))
222222 {
223223 // the last delimeter can be removed safely.
224224 if (directoryName[i] == FileSystem::PATH_DELIM)
@@ -317,6 +317,11 @@ Aws::String CreateTempFilePath()
317317 // Definition from the MSVC stdio.h
318318 #define L_tmpnam_s (sizeof (" \\ " ) + 16 )
319319#endif
320+
321+ #if defined(__MINGW64_VERSION_MAJOR) && __MINGW64_VERSION_MAJOR < 12
322+ #undef L_tmpnam_s
323+ #define L_tmpnam_s 260
324+ #endif
320325 char s_tempName[L_tmpnam_s+1 ];
321326
322327 /*
@@ -328,7 +333,7 @@ Aws::String CreateTempFilePath()
328333 for more details.
329334 */
330335
331- #if _MSC_VER >= 1900
336+ #if _MSC_VER >= 1900 || defined(_UCRT)
332337 tmpnam_s (s_tempName, L_tmpnam_s);
333338#else
334339 s_tempName[0 ] = ' .' ;
You can’t perform that action at this time.
0 commit comments