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 88e58a0 + 44e22f1 commit 3e3ff59Copy full SHA for 3e3ff59
compat/mingw.c
@@ -1328,8 +1328,11 @@ char *mingw_mktemp(char *template)
1328
int offset = 0;
1329
1330
/* we need to return the path, thus no long paths here! */
1331
- if (xutftowcs_path(wtemplate, template) < 0)
+ if (xutftowcsn(wtemplate, template, MAX_PATH, -1) < 0) {
1332
+ if (errno == ERANGE)
1333
+ errno = ENAMETOOLONG;
1334
return NULL;
1335
+ }
1336
1337
if (is_dir_sep(template[0]) && !is_dir_sep(template[1]) &&
1338
iswalpha(wtemplate[0]) && wtemplate[1] == L':') {
0 commit comments