Skip to content

Commit 207275f

Browse files
vdyedscho
authored andcommitted
Merge pull request #3492 from dscho/ns/batched-fsync
Switch to batched fsync by default
2 parents 71054af + d9955da commit 207275f

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

13031303
/* we need to return the path, thus no long paths here! */
1304-
if (xutftowcs_path(wtemplate, template) < 0)
1304+
if (xutftowcsn(wtemplate, template, MAX_PATH, -1) < 0) {
1305+
if (errno == ERANGE)
1306+
errno = ENAMETOOLONG;
13051307
return NULL;
1308+
}
13061309

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

0 commit comments

Comments
 (0)