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 e06aa1b + b02b183 commit 6cbd715Copy full SHA for 6cbd715
compat/mingw.c
@@ -1342,8 +1342,11 @@ char *mingw_mktemp(char *template)
1342
int offset = 0;
1343
1344
/* we need to return the path, thus no long paths here! */
1345
- if (xutftowcs_path(wtemplate, template) < 0)
+ if (xutftowcsn(wtemplate, template, MAX_PATH, -1) < 0) {
1346
+ if (errno == ERANGE)
1347
+ errno = ENAMETOOLONG;
1348
return NULL;
1349
+ }
1350
1351
if (is_dir_sep(template[0]) && !is_dir_sep(template[1]) &&
1352
iswalpha(wtemplate[0]) && wtemplate[1] == L':') {
0 commit comments