We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents eb1c7ed + 76ee820 commit 0650821Copy full SHA for 0650821
compat/mingw.c
@@ -1435,8 +1435,11 @@ char *mingw_mktemp(char *template)
1435
int offset = 0;
1436
1437
/* we need to return the path, thus no long paths here! */
1438
- if (xutftowcs_path(wtemplate, template) < 0)
+ if (xutftowcsn(wtemplate, template, MAX_PATH, -1) < 0) {
1439
+ if (errno == ERANGE)
1440
+ errno = ENAMETOOLONG;
1441
return NULL;
1442
+ }
1443
1444
if (is_dir_sep(template[0]) && !is_dir_sep(template[1]) &&
1445
iswalpha(wtemplate[0]) && wtemplate[1] == L':') {
0 commit comments