Skip to content

Commit 95b2d57

Browse files
committed
Merge pull request #3492 from dscho/ns/batched-fsync
Switch to batched fsync by default
2 parents 6fd2bb2 + 8e543ce commit 95b2d57

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
@@ -1256,8 +1256,11 @@ char *mingw_mktemp(char *template)
12561256
int offset = 0;
12571257

12581258
/* we need to return the path, thus no long paths here! */
1259-
if (xutftowcs_path(wtemplate, template) < 0)
1259+
if (xutftowcsn(wtemplate, template, MAX_PATH, -1) < 0) {
1260+
if (errno == ERANGE)
1261+
errno = ENAMETOOLONG;
12601262
return NULL;
1263+
}
12611264

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

0 commit comments

Comments
 (0)