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 b72cd05 + fdbfe2e commit 7572277Copy full SHA for 7572277
compat/mingw.c
@@ -1420,8 +1420,11 @@ char *mingw_mktemp(char *template)
1420
int offset = 0;
1421
1422
/* we need to return the path, thus no long paths here! */
1423
- if (xutftowcs_path(wtemplate, template) < 0)
+ if (xutftowcsn(wtemplate, template, MAX_PATH, -1) < 0) {
1424
+ if (errno == ERANGE)
1425
+ errno = ENAMETOOLONG;
1426
return NULL;
1427
+ }
1428
1429
if (is_dir_sep(template[0]) && !is_dir_sep(template[1]) &&
1430
iswalpha(wtemplate[0]) && wtemplate[1] == L':') {
0 commit comments