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 a23d56b + 2bf859e commit c1ae190Copy full SHA for c1ae190
compat/mingw.c
@@ -1409,8 +1409,11 @@ char *mingw_mktemp(char *template)
1409
int offset = 0;
1410
1411
/* we need to return the path, thus no long paths here! */
1412
- if (xutftowcs_path(wtemplate, template) < 0)
+ if (xutftowcsn(wtemplate, template, MAX_PATH, -1) < 0) {
1413
+ if (errno == ERANGE)
1414
+ errno = ENAMETOOLONG;
1415
return NULL;
1416
+ }
1417
1418
if (is_dir_sep(template[0]) && !is_dir_sep(template[1]) &&
1419
iswalpha(wtemplate[0]) && wtemplate[1] == L':') {
0 commit comments