Skip to content

Commit 8111e99

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 53a4b4a + ae29a09 commit 8111e99

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

12601260
/* we need to return the path, thus no long paths here! */
1261-
if (xutftowcs_path(wtemplate, template) < 0)
1261+
if (xutftowcsn(wtemplate, template, MAX_PATH, -1) < 0) {
1262+
if (errno == ERANGE)
1263+
errno = ENAMETOOLONG;
12621264
return NULL;
1265+
}
12631266

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

0 commit comments

Comments
 (0)