We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents bc1dc9c + c0a99fb commit 1efcd34Copy full SHA for 1efcd34
compat/mingw.c
@@ -1434,8 +1434,11 @@ char *mingw_mktemp(char *template)
1434
int offset = 0;
1435
1436
/* we need to return the path, thus no long paths here! */
1437
- if (xutftowcs_path(wtemplate, template) < 0)
+ if (xutftowcsn(wtemplate, template, MAX_PATH, -1) < 0) {
1438
+ if (errno == ERANGE)
1439
+ errno = ENAMETOOLONG;
1440
return NULL;
1441
+ }
1442
1443
if (is_dir_sep(template[0]) && !is_dir_sep(template[1]) &&
1444
iswalpha(wtemplate[0]) && wtemplate[1] == L':') {
0 commit comments