Skip to content

Commit c034f75

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 db61e69 + e5c6291 commit c034f75

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

13301330
/* we need to return the path, thus no long paths here! */
1331-
if (xutftowcs_path(wtemplate, template) < 0)
1331+
if (xutftowcsn(wtemplate, template, MAX_PATH, -1) < 0) {
1332+
if (errno == ERANGE)
1333+
errno = ENAMETOOLONG;
13321334
return NULL;
1335+
}
13331336

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

0 commit comments

Comments
 (0)