Skip to content

Commit d05f2c9

Browse files
vdyedscho
authored andcommitted
Merge pull request #3492 from dscho/ns/batched-fsync
Switch to batched fsync by default
2 parents 2d4c2a9 + 7993c46 commit d05f2c9

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

14371437
/* we need to return the path, thus no long paths here! */
1438-
if (xutftowcs_path(wtemplate, template) < 0)
1438+
if (xutftowcsn(wtemplate, template, MAX_PATH, -1) < 0) {
1439+
if (errno == ERANGE)
1440+
errno = ENAMETOOLONG;
14391441
return NULL;
1442+
}
14401443

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

0 commit comments

Comments
 (0)