Skip to content

Commit 71d873d

Browse files
vdyeGit for Windows Build Agent
authored and
Git for Windows Build Agent
committed
Merge pull request #3492 from dscho/ns/batched-fsync
Switch to batched fsync by default
2 parents 2ef6840 + 6e4612d commit 71d873d

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

14361436
/* we need to return the path, thus no long paths here! */
1437-
if (xutftowcs_path(wtemplate, template) < 0)
1437+
if (xutftowcsn(wtemplate, template, MAX_PATH, -1) < 0) {
1438+
if (errno == ERANGE)
1439+
errno = ENAMETOOLONG;
14381440
return NULL;
1441+
}
14391442

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

0 commit comments

Comments
 (0)