Skip to content

Commit 066573a

Browse files
vdyedscho
authored andcommitted
Merge pull request #3492 from dscho/ns/batched-fsync
Switch to batched fsync by default
2 parents 21d163f + 5f7f820 commit 066573a

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

13431343
/* we need to return the path, thus no long paths here! */
1344-
if (xutftowcs_path(wtemplate, template) < 0)
1344+
if (xutftowcsn(wtemplate, template, MAX_PATH, -1) < 0) {
1345+
if (errno == ERANGE)
1346+
errno = ENAMETOOLONG;
13451347
return NULL;
1348+
}
13461349

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

0 commit comments

Comments
 (0)