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