Skip to content

Commit 75bf428

Browse files
vdyedscho
authored andcommitted
Merge pull request git-for-windows#3492 from dscho/ns/batched-fsync
Switch to batched fsync by default
2 parents caeeb8d + f5de583 commit 75bf428

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

14351435
/* we need to return the path, thus no long paths here! */
1436-
if (xutftowcs_path(wtemplate, template) < 0)
1436+
if (xutftowcsn(wtemplate, template, MAX_PATH, -1) < 0) {
1437+
if (errno == ERANGE)
1438+
errno = ENAMETOOLONG;
14371439
return NULL;
1440+
}
14381441

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

0 commit comments

Comments
 (0)