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 c4fbaad + 5fef08a commit d97747dCopy full SHA for d97747d
compat/mingw.c
@@ -1258,8 +1258,11 @@ char *mingw_mktemp(char *template)
1258
int offset = 0;
1259
1260
/* we need to return the path, thus no long paths here! */
1261
- if (xutftowcs_path(wtemplate, template) < 0)
+ if (xutftowcsn(wtemplate, template, MAX_PATH, -1) < 0) {
1262
+ if (errno == ERANGE)
1263
+ errno = ENAMETOOLONG;
1264
return NULL;
1265
+ }
1266
1267
if (is_dir_sep(template[0]) && !is_dir_sep(template[1]) &&
1268
iswalpha(wtemplate[0]) && wtemplate[1] == L':') {
0 commit comments