Skip to content

Commit 8cad34c

Browse files
vdyedscho
authored andcommitted
Merge pull request #3492 from dscho/ns/batched-fsync
Switch to batched fsync by default
2 parents 13ea881 + 5bab650 commit 8cad34c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

compat/mingw.c

+4-1
Original file line numberDiff line numberDiff line change
@@ -1409,8 +1409,11 @@ char *mingw_mktemp(char *template)
14091409
int offset = 0;
14101410

14111411
/* we need to return the path, thus no long paths here! */
1412-
if (xutftowcs_path(wtemplate, template) < 0)
1412+
if (xutftowcsn(wtemplate, template, MAX_PATH, -1) < 0) {
1413+
if (errno == ERANGE)
1414+
errno = ENAMETOOLONG;
14131415
return NULL;
1416+
}
14141417

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

0 commit comments

Comments
 (0)