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 39684a8 + 4b439d6 commit 308812bCopy full SHA for 308812b
compat/mingw.c
@@ -1304,8 +1304,11 @@ char *mingw_mktemp(char *template)
1304
int offset = 0;
1305
1306
/* we need to return the path, thus no long paths here! */
1307
- if (xutftowcs_path(wtemplate, template) < 0)
+ if (xutftowcsn(wtemplate, template, MAX_PATH, -1) < 0) {
1308
+ if (errno == ERANGE)
1309
+ errno = ENAMETOOLONG;
1310
return NULL;
1311
+ }
1312
1313
if (is_dir_sep(template[0]) && !is_dir_sep(template[1]) &&
1314
iswalpha(wtemplate[0]) && wtemplate[1] == L':') {
0 commit comments