Skip to content

Commit 76aff49

Browse files
vdyeGit for Windows Build Agent
authored andcommitted
Merge pull request #3492 from dscho/ns/batched-fsync
Switch to batched fsync by default
2 parents cb3821f + c53c897 commit 76aff49

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

13281328
/* we need to return the path, thus no long paths here! */
1329-
if (xutftowcs_path(wtemplate, template) < 0)
1329+
if (xutftowcsn(wtemplate, template, MAX_PATH, -1) < 0) {
1330+
if (errno == ERANGE)
1331+
errno = ENAMETOOLONG;
13301332
return NULL;
1333+
}
13311334

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

0 commit comments

Comments
 (0)