Skip to content

Commit 67caf84

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 5439834 + 72ec33e commit 67caf84

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

13061306
/* we need to return the path, thus no long paths here! */
1307-
if (xutftowcs_path(wtemplate, template) < 0)
1307+
if (xutftowcsn(wtemplate, template, MAX_PATH, -1) < 0) {
1308+
if (errno == ERANGE)
1309+
errno = ENAMETOOLONG;
13081310
return NULL;
1311+
}
13091312

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

0 commit comments

Comments
 (0)