Skip to content

Commit da6cc62

Browse files
vdyeGit for Windows Build Agent
authored andcommitted
Merge pull request #3492 from dscho/ns/batched-fsync
Switch to batched fsync by default
2 parents 09075fb + 6088d50 commit da6cc62

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

compat/mingw.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1257,8 +1257,11 @@ char *mingw_mktemp(char *template)
12571257
int offset = 0;
12581258

12591259
/* we need to return the path, thus no long paths here! */
1260-
if (xutftowcs_path(wtemplate, template) < 0)
1260+
if (xutftowcsn(wtemplate, template, MAX_PATH, -1) < 0) {
1261+
if (errno == ERANGE)
1262+
errno = ENAMETOOLONG;
12611263
return NULL;
1264+
}
12621265

12631266
if (is_dir_sep(template[0]) && !is_dir_sep(template[1]) &&
12641267
iswalpha(wtemplate[0]) && wtemplate[1] == L':') {

0 commit comments

Comments
 (0)