Skip to content

Commit 8dc2646

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 53638f5 + 1c8b761 commit 8dc2646

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

14121412
/* we need to return the path, thus no long paths here! */
1413-
if (xutftowcs_path(wtemplate, template) < 0)
1413+
if (xutftowcsn(wtemplate, template, MAX_PATH, -1) < 0) {
1414+
if (errno == ERANGE)
1415+
errno = ENAMETOOLONG;
14141416
return NULL;
1417+
}
14151418

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

0 commit comments

Comments
 (0)